Use xdg-shell version 6

This gives us window "suspended" events. Theoretically these could be
used to implement glfwWindowIconified() and thereby not render suspended
OS windows. However let's wait a bit and see how this stabilizes. There
are all sorts of bugs around this currently, for example:

https://gitlab.gnome.org/GNOME/mutter/-/issues/3435
https://gitlab.gnome.org/GNOME/mutter/-/issues/3229
https://bugreports.qt.io/browse/QTBUG-124450
This commit is contained in:
Kovid Goyal 2024-05-05 13:24:45 +05:30
parent a4c9cb6d28
commit 6e1df67e03
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

4
glfw/wl_init.c vendored
View file

@ -521,7 +521,9 @@ static void registryHandleGlobal(void* data UNUSED,
else if (is(xdg_wm_base))
{
_glfw.wl.xdg_wm_base_version = 1;
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
#ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION
_glfw.wl.xdg_wm_base_version = MIN(XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION, (int)version);
#elif defined(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
_glfw.wl.xdg_wm_base_version = MIN(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION, (int)version);
#endif
_glfw.wl.wmBase = wl_registry_bind(registry, name, &xdg_wm_base_interface, _glfw.wl.xdg_wm_base_version);