From f2a0a8b8be41210793e786b05a7d2e1edcf8d38f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20=C3=85dahl?= Date: Fri, 10 Mar 2023 23:30:51 +0100 Subject: [PATCH] x11/surface: Clear compute_size idle source also when destroying Doing it on hide() is not enough, since in some edge cases we didn't ever actually map, we just attempted to compute the size, e.g. in response to a ConfigureNotify event, then the window was destroyed. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2678 --- gdk/x11/gdksurface-x11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 9ae867eb6f..a76e4824f2 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -1358,6 +1358,7 @@ gdk_x11_surface_destroy (GdkSurface *surface, unhook_surface_changed (surface); disconnect_frame_clock (surface); + g_clear_handle_id (&impl->compute_size_source_id, g_source_remove); if (impl->cairo_surface) { -- 2.30.2