From: Jonas Ã…dahl Date: Fri, 10 Mar 2023 22:30:51 +0000 (+0100) Subject: x11/surface: Clear compute_size idle source also when destroying X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~5^2~24^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f2a0a8b8be41210793e786b05a7d2e1edcf8d38f;p=gtk4.git 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 --- 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) {