[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.
This commit is contained in:
Quantum 2021-07-31 23:00:52 -04:00 committed by Geoffrey McRae
parent 0ad469178a
commit 96bcfff28b

View File

@ -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,