[gtk+/gtk-2-18] Protect against X errors when clearing the DND cache
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-18] Protect against X errors when clearing the DND cache
- Date: Fri, 12 Mar 2010 23:03:12 +0000 (UTC)
commit d3374dbc0088b376d072f0419b0ae9b97a0da309
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 23 12:32:36 2010 -0500
Protect against X errors when clearing the DND cache
This was reported as a problem in bug 609952.
(cherry picked from commit 325cbef27edd58b801509a2016aee6ab6e49d2f1)
gdk/x11/gdkdnd-x11.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index db3e86f..a3c1860 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -569,15 +569,21 @@ static void
gdk_window_cache_destroy (GdkWindowCache *cache)
{
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),
cache->old_event_mask);
gdk_window_remove_filter (root_window, gdk_window_cache_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_flush ();
+ gdk_error_trap_pop ();
+
g_list_free (cache->children);
g_hash_table_destroy (cache->child_hash);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]