Author: olivier
Date: 2008-05-15 21:51:51 +0000 (Thu, 15 May 2008)
New Revision: 26963

Modified:
   xfwm4/trunk/src/events.c
Log:
Simpler

Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c    2008-05-15 21:22:47 UTC (rev 26962)
+++ xfwm4/trunk/src/events.c    2008-05-15 21:51:51 UTC (rev 26963)
@@ -871,9 +871,11 @@
     Client *c;
     Window win;
     int state, part;
+    gboolean replay;
 
     TRACE ("entering handleButtonPress");
 
+    replay = FALSE;
     c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME | 
SEARCH_WINDOW);
     if (c)
     {
@@ -997,7 +999,7 @@
         }
         else if (ev->window == c->window)
         {
-            XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
+            replay = TRUE;
             clientPassGrabMouseButton (c);
             if (((screen_info->params->raise_with_any_button) && (c->type & 
WINDOW_REGULAR_FOCUSABLE)) || (ev->button == Button1))
             {
@@ -1036,8 +1038,8 @@
         }
     }
 
-    /* Release queued events */
-    XAllowEvents (display_info->dpy, SyncPointer, myDisplayGetCurrentTime 
(display_info));
+    /* Release pending events */
+    XAllowEvents (display_info->dpy, replay ? ReplayPointer : SyncPointer, 
myDisplayGetCurrentTime (display_info));
 
     return EVENT_FILTER_REMOVE;
 }

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to