diff options
author | Benjamin Otte <otte.benjamin@googlemail.com> | 2023-04-16 18:02:33 +0000 |
---|---|---|
committer | Benjamin Otte <otte.benjamin@googlemail.com> | 2023-04-16 18:02:33 +0000 |
commit | a299656c6049fd49a37ff682692ba43b159f148a (patch) | |
tree | 4cf287660fbd0fdb822895b1400d750cb8bf7b25 | |
parent | ff141a1ed498b34370cc5ac416f68cd88f7d1b55 (diff) | |
parent | 27fd0b907dd424a05a85b91ca0eab3a161690009 (diff) | |
download | gtk+-a299656c6049fd49a37ff682692ba43b159f148a.tar.gz |
Merge branch 'wip/otte/alt.wl_surface.die.die.die' into 'main'
wayland: Don't leak all surfaces
See merge request GNOME/gtk!5840
-rw-r--r-- | gdk/wayland/gdksurface-wayland.c | 4 | ||||
-rw-r--r-- | testsuite/gtk/shortcuts.c | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 36aac757b0..4ead1d29aa 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -556,7 +556,7 @@ gdk_wayland_surface_dispose (GObject *object) GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface)); display_wayland->event_queues = - g_list_remove (display_wayland->event_queues, surface); + g_list_remove (display_wayland->event_queues, impl->event_queue); g_clear_pointer (&impl->event_queue, wl_event_queue_destroy); } @@ -896,8 +896,6 @@ _gdk_wayland_display_create_surface (GdkDisplay *display, surface->width = width; surface->height = height; - g_object_ref (surface); - /* More likely to be right than just assuming 1 */ if (wl_compositor_get_version (display_wayland->compositor) >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION) { diff --git a/testsuite/gtk/shortcuts.c b/testsuite/gtk/shortcuts.c index 10a7913faa..f4895c5d2e 100644 --- a/testsuite/gtk/shortcuts.c +++ b/testsuite/gtk/shortcuts.c @@ -360,7 +360,6 @@ test_trigger_trigger (void) } gdk_surface_destroy (surface); - g_object_unref (surface); g_object_unref (trigger[0]); g_object_unref (trigger[1]); |