[gtk+/gtk-3-4] Fix a case of 'stuck grab'



commit 18de282771b30e6e9ab8c2c8ba314484a29ac643
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 16 17:18:51 2012 -0400

    Fix a case of 'stuck grab'
    
    This was showing up when using a combo box in list mode. After popping
    up the list, the keyboard grab appeared stuck. What was stuck here is
    only the client-side grab, since we forgot to clean up our grabs
    when receiving an UnmapNotify.
    
    This bug was introduced in 1c970036648bffd5d58499bb7c8e2439b84d4397.

 gdk/x11/gdkdisplay-x11.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index fe3784a..3ef8fa0 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -659,16 +659,15 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
            * means we hid the window ourselves, so we will have already flipped
            * the iconified bit off.
            */
-          if (window)
-            {
-              if (GDK_WINDOW_IS_MAPPED (window))
-                gdk_synthesize_window_state (window,
-                                             0,
-                                             GDK_WINDOW_STATE_ICONIFIED);
-              _gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
-            }
+          if (window && GDK_WINDOW_IS_MAPPED (window))
+            gdk_synthesize_window_state (window,
+                                         0,
+                                         GDK_WINDOW_STATE_ICONIFIED);
         }
 
+      if (window)
+        _gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
+
       break;
 
     case MapNotify:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]