Merge branch 'wip/fix-suspend-state' into 'main'

wayland: Bind correct xdg_wm_base version

See merge request GNOME/gtk!6385
This commit is contained in:
Matthias Clasen 2023-09-12 16:51:50 +00:00
commit 9ab07553a3
2 changed files with 16 additions and 1 deletions

View File

@ -96,6 +96,12 @@
#define XDG_ACTIVATION_VERSION 1
#define OUTPUT_VERSION 3
#ifdef HAVE_TOPLEVEL_STATE_SUSPENDED
#define XDG_WM_BASE_VERSION 6
#else
#define XDG_WM_BASE_VERSION 5
#endif
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
G_DEFINE_TYPE (GdkWaylandDisplay, gdk_wayland_display, GDK_TYPE_DISPLAY)
@ -638,7 +644,8 @@ _gdk_wayland_display_open (const char *display_name)
wl_registry_bind (display_wayland->wl_registry,
display_wayland->xdg_wm_base_id,
&xdg_wm_base_interface,
MIN (display_wayland->xdg_wm_base_version, 4));
MIN (display_wayland->xdg_wm_base_version,
XDG_WM_BASE_VERSION));
xdg_wm_base_add_listener (display_wayland->xdg_wm_base,
&xdg_wm_base_listener,
display_wayland);

View File

@ -672,10 +672,18 @@ xdg_toplevel_configure_bounds (void *data,
toplevel->pending.has_bounds = TRUE;
}
static void
xdg_toplevel_wm_capabilities (void *data,
struct xdg_toplevel *xdg_toplevel,
struct wl_array *capabilities)
{
}
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_configure,
xdg_toplevel_close,
xdg_toplevel_configure_bounds,
xdg_toplevel_wm_capabilities,
};
static void