1
0
Fork 0

tests/wayland/client-utils: Add optional xdg-shell v6 support

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3475>
This commit is contained in:
Jonas Ådahl 2024-03-25 13:25:38 +01:00 committed by Marge Bot
parent f23e1218e3
commit c5caa4afb5
2 changed files with 21 additions and 0 deletions

View file

@ -347,6 +347,9 @@ handle_registry_global (void *user_data,
if (display->capabilities &
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V4)
xdg_wm_base_version = 4;
if (display->capabilities &
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V6)
xdg_wm_base_version = 6;
g_assert_cmpint (version, >=, xdg_wm_base_version);
@ -539,9 +542,26 @@ handle_xdg_toplevel_close (void *data,
g_assert_not_reached ();
}
static void
handle_xdg_toplevel_bounds (void *data,
struct xdg_toplevel *xdg_toplevel,
int32_t width,
int32_t height)
{
}
static void
handle_xdg_toplevel_wm_capabilities (void *data,
struct xdg_toplevel *xdg_toplevel,
struct wl_array *capabilities)
{
}
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
handle_xdg_toplevel_configure,
handle_xdg_toplevel_close,
handle_xdg_toplevel_bounds,
handle_xdg_toplevel_wm_capabilities,
};
static void

View file

@ -18,6 +18,7 @@ typedef enum _WaylandDisplayCapabilities
WAYLAND_DISPLAY_CAPABILITY_NONE = 0,
WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER = 1 << 0,
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V4 = 1 << 1,
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V6 = 1 << 2,
} WaylandDisplayCapabilities;
typedef struct _DmaBufFormat