GdkWaylandWindow: Clear export user data when used
authorJonas Ådahl <jadahl@gmail.com>
Fri, 5 May 2017 11:07:04 +0000 (19:07 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 8 May 2017 19:47:12 +0000 (15:47 -0400)
It was only cleared when unexported, but we could just as well clear it
when its used too.

https://bugzilla.gnome.org/show_bug.cgi?id=782109

gdk/wayland/gdkwindow-wayland.c

index 2b25faa882ca881cfcbbab8111d09441c2d945f5..191ab214a1b32233f11abc7aca4966a5b70084a2 100644 (file)
@@ -4027,7 +4027,8 @@ xdg_exported_handle (void                    *data,
   GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
 
   impl->exported.callback (window, handle, impl->exported.user_data);
-  impl->exported.user_data = NULL;
+  g_clear_pointer (&impl->exported.user_data,
+                   impl->exported.destroy_func);
 }
 
 static const struct zxdg_exported_v1_listener xdg_exported_listener = {