[Xfce4-commits] <xfwm4:xfce-4.8> Fix some events being lost causing the tabwin window to remain sometimes after the key has been released
Olivier Fourdan
noreply at xfce.org
Fri Oct 28 16:46:01 CEST 2011
Updating branch refs/heads/xfce-4.8
to f0144a0eaafbd36c8cb2bafd605d255c54ef410c (commit)
from 8523e56fc99aea8d9319b15a306ec115fdb171bb (commit)
commit f0144a0eaafbd36c8cb2bafd605d255c54ef410c
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Fri Oct 28 15:51:18 2011 +0200
Fix some events being lost causing the tabwin window to remain sometimes after the key has been released
src/events.c | 12 ++++++++----
src/main.c | 2 ++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/events.c b/src/events.c
index dec1174..b7ab6e0 100644
--- a/src/events.c
+++ b/src/events.c
@@ -300,8 +300,6 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
TRACE ("entering handleKeyEvent");
- XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
-
ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
if (!ev_screen_info)
{
@@ -518,6 +516,9 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
break;
}
+ /* Release pending events */
+ XAllowEvents (display_info->dpy, SyncKeyboard, CurrentTime);
+
return status;
}
@@ -526,6 +527,9 @@ handleKeyRelease (DisplayInfo *display_info, XKeyEvent * ev)
{
TRACE ("entering handleKeyRelease");
+ /* Release pending events */
+ XAllowEvents (display_info->dpy, SyncKeyboard, CurrentTime);
+
return EVENT_FILTER_PASS;
}
@@ -1030,7 +1034,7 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev)
}
/* Release pending events */
- XAllowEvents (display_info->dpy, replay ? ReplayPointer : SyncPointer, myDisplayGetCurrentTime (display_info));
+ XAllowEvents (display_info->dpy, replay ? ReplayPointer : SyncPointer, CurrentTime);
return EVENT_FILTER_REMOVE;
}
@@ -1050,7 +1054,7 @@ handleButtonRelease (DisplayInfo *display_info, XButtonEvent * ev)
}
/* Release pending events */
- XAllowEvents (display_info->dpy, SyncPointer, myDisplayGetCurrentTime (display_info));
+ XAllowEvents (display_info->dpy, SyncPointer, CurrentTime);
return EVENT_FILTER_REMOVE;
}
diff --git a/src/main.c b/src/main.c
index 272edd2..e5fb24b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -70,6 +70,8 @@
SubstructureRedirectMask|\
ButtonPressMask|\
ButtonReleaseMask|\
+ KeyPressMask|\
+ KeyReleaseMask|\
FocusChangeMask|\
PropertyChangeMask|\
ColormapNotify
More information about the Xfce4-commits
mailing list