From e05d586f17d20a45e09ba48522841e3fab97ad34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 31 Dec 2019 11:16:23 +0100 Subject: [PATCH] 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. --- bar/wayland.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bar/wayland.c b/bar/wayland.c index af40599..7348b66 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -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; }