From fa586b9ac18da66059e18609ef6a805aeeb8e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 14 Mar 2019 19:41:06 +0100 Subject: [PATCH] wayland: depend on xdg-output for output size/positioning information --- bar/wayland.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bar/wayland.c b/bar/wayland.c index 54b6006..94a1294 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -255,8 +255,6 @@ output_geometry(void *data, struct wl_output *wl_output, int32_t x, int32_t y, int32_t transform) { struct monitor *mon = data; - mon->x = x; - mon->y = y; mon->width_mm = physical_width; mon->height_mm = physical_height; } @@ -265,9 +263,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->width_px = width; - mon->height_px = height; } static void @@ -295,12 +290,18 @@ xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output, int32_t x, int32_t y) { + struct monitor *mon = data; + mon->x = x; + mon->y = y; } static void xdg_output_handle_logical_size(void *data, struct zxdg_output_v1 *xdg_output, int32_t width, int32_t height) { + struct monitor *mon = data; + mon->width_px = width; + mon->height_px = height; } static void