tests/wayland/client-utils: Add GObject parent instance field

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3475>
This commit is contained in:
Jonas Ådahl 2024-03-25 12:56:02 +01:00 committed by Marge Bot
parent eab06bcf24
commit 2d18b976c1
3 changed files with 4 additions and 2 deletions

View File

@ -58,8 +58,8 @@ main (int argc,
char **argv)
{
struct wl_registry *registry;
g_autoptr (WaylandSurface) surface;
g_autoptr (WaylandDisplay) display = NULL;
g_autoptr (WaylandSurface) surface = NULL;
struct zwp_idle_inhibitor_v1 *inhibitor;
display = wayland_display_new (WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER);

View File

@ -62,6 +62,8 @@ G_DECLARE_FINAL_TYPE (WaylandDisplay, wayland_display,
typedef struct _WaylandSurface
{
GObject parent;
WaylandDisplay *display;
struct wl_surface *wl_surface;

View File

@ -128,11 +128,11 @@ int
main (int argc,
char **argv)
{
g_autoptr (WaylandDisplay) display = NULL;
g_autoptr (WaylandSurface) window1 = NULL;
g_autoptr (WaylandSurface) window2 = NULL;
g_autoptr (WaylandSurface) window3 = NULL;
g_autoptr (WaylandSurface) window4 = NULL;
g_autoptr (WaylandDisplay) display = NULL;
g_autofree char *handle1 = NULL;
g_autofree char *handle3 = NULL;
struct wl_registry *registry;