mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 23:00:08 +00:00
Protect against X errors when clearing the DND cache
This was reported as a problem in bug 609952.
This commit is contained in:
parent
4815119eab
commit
c5dc38c142
@ -573,15 +573,21 @@ static void
|
|||||||
gdk_window_cache_destroy (GdkWindowCache *cache)
|
gdk_window_cache_destroy (GdkWindowCache *cache)
|
||||||
{
|
{
|
||||||
GdkWindow *root_window = gdk_screen_get_root_window (cache->screen);
|
GdkWindow *root_window = gdk_screen_get_root_window (cache->screen);
|
||||||
|
|
||||||
XSelectInput (GDK_WINDOW_XDISPLAY (root_window),
|
XSelectInput (GDK_WINDOW_XDISPLAY (root_window),
|
||||||
GDK_WINDOW_XWINDOW (root_window),
|
GDK_WINDOW_XWINDOW (root_window),
|
||||||
cache->old_event_mask);
|
cache->old_event_mask);
|
||||||
gdk_window_remove_filter (root_window, gdk_window_cache_filter, cache);
|
gdk_window_remove_filter (root_window, gdk_window_cache_filter, cache);
|
||||||
gdk_window_remove_filter (NULL, gdk_window_cache_shape_filter, cache);
|
gdk_window_remove_filter (NULL, gdk_window_cache_shape_filter, cache);
|
||||||
|
|
||||||
g_list_foreach (cache->children, (GFunc)free_cache_child,
|
gdk_error_trap_push ();
|
||||||
|
|
||||||
|
g_list_foreach (cache->children, (GFunc)free_cache_child,
|
||||||
gdk_screen_get_display (cache->screen));
|
gdk_screen_get_display (cache->screen));
|
||||||
|
|
||||||
|
gdk_flush ();
|
||||||
|
gdk_error_trap_pop ();
|
||||||
|
|
||||||
g_list_free (cache->children);
|
g_list_free (cache->children);
|
||||||
g_hash_table_destroy (cache->child_hash);
|
g_hash_table_destroy (cache->child_hash);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user