summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2023-04-21 09:26:23 +0200
committerMatthias Clasen <mclasen@redhat.com>2023-04-21 09:26:23 +0200
commit555c7e9ee2398320d138b2e8178418e2b399778f (patch)
treef495795c19185069da5bf0be9eaa44e41b43447c
parent79d8220908c209a4268f29883db121c949b75b1a (diff)
downloadgtk+-555c7e9ee2398320d138b2e8178418e2b399778f.tar.gz
wayland: Don't leak all surfaces
X11 does add an extra reference to surfaces that gets released when the DestroyNotify event arrives. Wayland doesn't ave such an event, so that reference never gets released. This fixes a copy/paste error introduced in commit 590f3dfa1fcb.
-rw-r--r--gdk/wayland/gdksurface-wayland.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 40b136cb98..4ded693385 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -520,8 +520,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 (display_wayland->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE)
{