From cceccc0f68a79c9b22ccc13b42cb1d0449146a70 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 12 Dec 2023 16:31:49 +0100 Subject: [PATCH] tests/wayland-test-clients: Add missing WAYLAND_TYPE_DISPLAY define Part-of: --- .../wayland-test-clients/wayland-test-client-utils.c | 6 ++++-- .../wayland-test-clients/wayland-test-client-utils.h | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/tests/wayland-test-clients/wayland-test-client-utils.c b/src/tests/wayland-test-clients/wayland-test-client-utils.c index a964d4c38..1de9d9a55 100644 --- a/src/tests/wayland-test-clients/wayland-test-client-utils.c +++ b/src/tests/wayland-test-clients/wayland-test-client-utils.c @@ -43,7 +43,9 @@ static guint signals[N_SIGNALS]; static struct wl_callback *effects_complete_callback; static struct wl_callback *view_verification_callback; -G_DEFINE_TYPE (WaylandDisplay, wayland_display, G_TYPE_OBJECT) +G_DEFINE_TYPE (WaylandDisplay, + wayland_display, + G_TYPE_OBJECT) static int create_tmpfile_cloexec (char *tmpname) @@ -232,7 +234,7 @@ wayland_display_new_full (WaylandDisplayCapabilities capabilities, g_assert_nonnull (wayland_display); - display = g_object_new (wayland_display_get_type (), NULL); + display = g_object_new (WAYLAND_TYPE_DISPLAY, NULL); display->capabilities = capabilities; display->properties = g_hash_table_new_full (g_str_hash, g_str_equal, diff --git a/src/tests/wayland-test-clients/wayland-test-client-utils.h b/src/tests/wayland-test-clients/wayland-test-client-utils.h index 6451f369f..86d80566e 100644 --- a/src/tests/wayland-test-clients/wayland-test-client-utils.h +++ b/src/tests/wayland-test-clients/wayland-test-client-utils.h @@ -39,6 +39,11 @@ typedef struct _WaylandDisplay GHashTable *properties; } WaylandDisplay; +#define WAYLAND_TYPE_DISPLAY (wayland_display_get_type ()) +G_DECLARE_FINAL_TYPE (WaylandDisplay, wayland_display, + WAYLAND, DISPLAY, + GObject) + typedef struct _WaylandSurface { WaylandDisplay *display; @@ -55,10 +60,6 @@ typedef struct _WaylandSurface uint32_t color; } WaylandSurface; -G_DECLARE_FINAL_TYPE (WaylandDisplay, wayland_display, - WAYLAND, DISPLAY, - GObject) - int create_anonymous_file (off_t size); WaylandDisplay * wayland_display_new (WaylandDisplayCapabilities capabilities);