tests/wayland-test-client-utils: Allow to bind to cursor shape
Also allow specifying to version so we can test version specific things. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4307>
This commit is contained in:
parent
0e4f4147a2
commit
b18565cee6
@ -454,6 +454,18 @@ handle_registry_global (void *user_data,
|
|||||||
wl_registry_bind (registry, id,
|
wl_registry_bind (registry, id,
|
||||||
&wp_color_manager_v1_interface, 1);
|
&wp_color_manager_v1_interface, 1);
|
||||||
}
|
}
|
||||||
|
else if (strcmp (interface, wp_cursor_shape_manager_v1_interface.name) == 0)
|
||||||
|
{
|
||||||
|
int cusor_shape_version = 1;
|
||||||
|
|
||||||
|
if (display->capabilities & WAYLAND_DISPLAY_CAPABILITY_CURSOR_SHAPE_V2)
|
||||||
|
cusor_shape_version = 2;
|
||||||
|
|
||||||
|
display->cursor_shape_mgr =
|
||||||
|
wl_registry_bind (registry, id,
|
||||||
|
&wp_cursor_shape_manager_v1_interface,
|
||||||
|
cusor_shape_version);
|
||||||
|
}
|
||||||
else if (strcmp (interface, wp_viewporter_interface.name) == 0)
|
else if (strcmp (interface, wp_viewporter_interface.name) == 0)
|
||||||
{
|
{
|
||||||
display->viewporter = wl_registry_bind (registry, id,
|
display->viewporter = wl_registry_bind (registry, id,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
|
||||||
#include "color-management-v1-client-protocol.h"
|
#include "color-management-v1-client-protocol.h"
|
||||||
|
#include "cursor-shape-v1-client-protocol.h"
|
||||||
#include "fractional-scale-v1-client-protocol.h"
|
#include "fractional-scale-v1-client-protocol.h"
|
||||||
#include "linux-dmabuf-v1-client-protocol.h"
|
#include "linux-dmabuf-v1-client-protocol.h"
|
||||||
#include "single-pixel-buffer-v1-client-protocol.h"
|
#include "single-pixel-buffer-v1-client-protocol.h"
|
||||||
@ -20,6 +21,7 @@ typedef enum _WaylandDisplayCapabilities
|
|||||||
WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER = 1 << 0,
|
WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER = 1 << 0,
|
||||||
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V4 = 1 << 1,
|
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V4 = 1 << 1,
|
||||||
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V6 = 1 << 2,
|
WAYLAND_DISPLAY_CAPABILITY_XDG_SHELL_V6 = 1 << 2,
|
||||||
|
WAYLAND_DISPLAY_CAPABILITY_CURSOR_SHAPE_V2 = 1 << 3,
|
||||||
} WaylandDisplayCapabilities;
|
} WaylandDisplayCapabilities;
|
||||||
|
|
||||||
typedef struct _DmaBufFormat
|
typedef struct _DmaBufFormat
|
||||||
@ -44,6 +46,7 @@ typedef struct _WaylandDisplay
|
|||||||
struct wp_fractional_scale_manager_v1 *fractional_scale_mgr;
|
struct wp_fractional_scale_manager_v1 *fractional_scale_mgr;
|
||||||
struct wp_single_pixel_buffer_manager_v1 *single_pixel_mgr;
|
struct wp_single_pixel_buffer_manager_v1 *single_pixel_mgr;
|
||||||
struct wp_color_manager_v1 *color_management_mgr;
|
struct wp_color_manager_v1 *color_management_mgr;
|
||||||
|
struct wp_cursor_shape_manager_v1 *cursor_shape_mgr;
|
||||||
struct wp_viewporter *viewporter;
|
struct wp_viewporter *viewporter;
|
||||||
struct xdg_wm_base *xdg_wm_base;
|
struct xdg_wm_base *xdg_wm_base;
|
||||||
struct wl_seat *wl_seat;
|
struct wl_seat *wl_seat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user