From: Benjamin Otte Date: Sun, 16 Apr 2023 02:39:21 +0000 (+0200) Subject: wayland: Don't leak all surfaces X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~398^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=62951c72770107e9eb45dd476fda83cb38b84f67;p=gtk4.git 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. --- diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 0389822f80..4ead1d29aa 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -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) {