c078ec
From 090159cec92921182f8eeb59762ceba11c1581f4 Mon Sep 17 00:00:00 2001
c078ec
From: Marek Kasik <mkasik@redhat.com>
c078ec
Date: Wed, 18 Dec 2013 18:28:39 +0100
c078ec
Subject: [PATCH 2/2] gdkwindow: Don't add the same window to "update_windows"
c078ec
 twice
c078ec
c078ec
This prevents passing of such window to another GMainLoop.
c078ec
c078ec
https://bugzilla.gnome.org/show_bug.cgi?id=711552
c078ec
---
c078ec
 gdk/gdkwindow.c | 9 +++++++++
c078ec
 1 file changed, 9 insertions(+)
c078ec
c078ec
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
c078ec
index 0f33fb0..153144a 100644
c078ec
--- a/gdk/gdkwindow.c
c078ec
+++ b/gdk/gdkwindow.c
c078ec
@@ -5242,6 +5242,15 @@ gdk_window_add_update_window (GdkWindow *window)
c078ec
   GSList *prev = NULL;
c078ec
   gboolean has_ancestor_in_list = FALSE;
c078ec
 
c078ec
+  /*  Check whether "window" is already in "update_windows" list.
c078ec
+   *  It could be added during execution of gtk_widget_destroy() when
c078ec
+   *  setting focus widget to NULL and redrawing old focus widget.
c078ec
+   *  See bug 711552.
c078ec
+   */
c078ec
+  tmp = g_slist_find (update_windows, window);
c078ec
+  if (tmp != NULL)
c078ec
+    return;
c078ec
+
c078ec
   for (tmp = update_windows; tmp; tmp = tmp->next)
c078ec
     {
c078ec
       GdkWindowObject *parent = GDK_WINDOW_OBJECT (window)->parent;
c078ec
-- 
c078ec
1.8.4.2
c078ec