Author: olivier
Date: 2009-02-20 12:37:26 +0000 (Fri, 20 Feb 2009)
New Revision: 29519

Modified:
   xfwm4/trunk/ChangeLog
   xfwm4/trunk/src/events.c
Log:
        * src/events.c: And do not release events on key release, as Super is
          both a modifier and a regular key that repeats, it breaks when used
          as a modifier (Bug #4959). 
 

Modified: xfwm4/trunk/ChangeLog
===================================================================
--- xfwm4/trunk/ChangeLog       2009-02-19 21:59:36 UTC (rev 29518)
+++ xfwm4/trunk/ChangeLog       2009-02-20 12:37:26 UTC (rev 29519)
@@ -1,5 +1,11 @@
 2009-02-19     olivier
 
+       * src/events.c: And do not release events on key release, as Super is
+         both a modifier and a regular key that repeats, it breaks when used
+         as a modifier (Bug #4959).
+
+2009-02-19     olivier
+
        * src/events.c: Use timestamp provided by the event itself to 
          release queued events (Bug #4959).
 

Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c    2009-02-19 21:59:36 UTC (rev 29518)
+++ xfwm4/trunk/src/events.c    2009-02-20 12:37:26 UTC (rev 29519)
@@ -297,11 +297,10 @@
     TRACE ("entering handleKeyEvent");
 
     ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
+    XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
+
     if (!ev_screen_info)
     {
-        /* Release queued events */
-        XAllowEvents (display_info->dpy, SyncKeyboard, ev->time);
-
         return EVENT_FILTER_PASS;
     }
 
@@ -402,10 +401,9 @@
                 }
                 break;
             case KEY_POPUP_MENU:
-                XAllowEvents (display_info->dpy, SyncKeyboard, CurrentTime);
                 show_window_menu (c, frameX (c) + frameLeft (c),
                                      frameY (c) + frameTop (c),
-                                     Button1, GDK_CURRENT_TIME);
+                                     Button1, ev->time);
                 break;
             case KEY_FILL_WINDOW:
                 clientFill (c, CLIENT_FILL);
@@ -510,9 +508,6 @@
             break;
     }
 
-    /* Release queued events */
-    XAllowEvents (display_info->dpy, SyncKeyboard, ev->time);
-
     return status;
 }
 
@@ -520,10 +515,13 @@
 handleKeyRelease (DisplayInfo *display_info, XKeyEvent * ev)
 {
     TRACE ("entering handleKeyRelease");
-
-    /* Release queued events */
-    XAllowEvents (display_info->dpy, SyncKeyboard, ev->time);
-
+#if 0
+    /*
+     * Do not release queued events here, that breaks with keys
+     * that are both modifier and regular key as they repeat
+     */
+    XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
+#endif
     return EVENT_FILTER_PASS;
 }
 

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to