forked from external/yambar
bar/wayland: WL_OUTPUT_MODE_PREFERRED doesn't meen this *output* is preferred
It means the *mode* (width, height, refresh) is the preferred one for *this* output.
This commit is contained in:
parent
d4201723a6
commit
e05d586f17
1 changed files with 2 additions and 5 deletions
|
@ -51,7 +51,6 @@ struct monitor {
|
|||
int width_px;
|
||||
int height_px;
|
||||
|
||||
bool preferred;
|
||||
int scale;
|
||||
};
|
||||
|
||||
|
@ -270,8 +269,6 @@ static void
|
|||
output_mode(void *data, struct wl_output *wl_output, uint32_t flags,
|
||||
int32_t width, int32_t height, int32_t refresh)
|
||||
{
|
||||
struct monitor *mon = data;
|
||||
mon->preferred = flags & WL_OUTPUT_MODE_PREFERRED;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -629,8 +626,8 @@ setup(struct bar *_bar)
|
|||
mon->name, mon->width_px, mon->height_px,
|
||||
mon->x, mon->y, mon->width_mm, mon->height_mm);
|
||||
|
||||
if (bar->monitor == NULL && mon->preferred) {
|
||||
/* User didn't specify a monitor, and this is the default one */
|
||||
if (bar->monitor == NULL) {
|
||||
/* User didn't specify a monitor */
|
||||
backend->monitor = mon;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue