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:
Daniel Eklöf 2019-12-31 11:16:23 +01:00
parent d4201723a6
commit e05d586f17
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;
}