wayland: Bind correct xdg_wm_base version
Otherwise we won't get the suspend state.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user