From 96bcfff28bcf593523a4ab2679e1d7a5f29e96a4 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 31 Jul 2021 23:00:52 -0400 Subject: [PATCH] [client] wayland: use zxdg_output_manager_v1 version 3 if possible Version 3 does not send xdg_output.done events, instead guaranteeing that all xdg_output.* events are sent before wl_output.done. This saves us from doing the work twice. --- client/displayservers/Wayland/registry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/displayservers/Wayland/registry.c b/client/displayservers/Wayland/registry.c index 85288ddb..365c8cc0 100644 --- a/client/displayservers/Wayland/registry.c +++ b/client/displayservers/Wayland/registry.c @@ -70,7 +70,8 @@ static void registryGlobalHandler(void * data, struct wl_registry * registry, &zwp_idle_inhibit_manager_v1_interface, 1); else if (!strcmp(interface, zxdg_output_manager_v1_interface.name) && version >= 2) wlWm.xdgOutputManager = wl_registry_bind(wlWm.registry, name, - &zxdg_output_manager_v1_interface, 2); + // we only need v2 to run, but v3 saves a callback + &zxdg_output_manager_v1_interface, version > 3 ? 3 : version); } static void registryGlobalRemoveHandler(void * data,