summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2023-03-10 23:30:51 +0100
committerJonas Ådahl <jadahl@gmail.com>2023-03-10 23:34:50 +0100
commitf2a0a8b8be41210793e786b05a7d2e1edcf8d38f (patch)
treea617e1ebaf7b9fe4cf745e0a6dc2d07d5db1ef9c
parent4014e956cdd15867c0ac70071fc1eef120c89559 (diff)
downloadgtk+-f2a0a8b8be41210793e786b05a7d2e1edcf8d38f.tar.gz
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
-rw-r--r--gdk/x11/gdksurface-x11.c1
1 files changed, 1 insertions, 0 deletions
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)
{