summaryrefslogtreecommitdiff
path: root/openbox/grab.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-22 04:23:00 +0000
committerDana Jansens <danakj@orodu.net>2003-09-22 04:23:00 +0000
commita43303bdcbb5460f8d50823c4d0cedc30de6bb57 (patch)
tree6cbfc9c107c50e5b9a62302e31499fed4a5a667d /openbox/grab.c
parentd5f9df0845eb28dee542a789e43ca4cc1b6d0a4f (diff)
dont need to swallow enter events on ungrab cuz we just ignore them all now
Diffstat (limited to 'openbox/grab.c')
-rw-r--r--openbox/grab.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/openbox/grab.c b/openbox/grab.c
index 9c6065a7..34fd2302 100644
--- a/openbox/grab.c
+++ b/openbox/grab.c
@@ -80,35 +80,6 @@ gboolean grab_pointer(gboolean grab, ObCursor cur)
} else if (pgrabs > 0) {
if (--pgrabs == 0) {
XUngrabPointer(ob_display, event_lasttime);
-
- /* ignore all enter events caused by ungrabbing the pointer */
- {
- GSList *saved = NULL, *it;
- XEvent *e;
- guint n = 0;
-
- XSync(ob_display, FALSE);
-
- /* count the events */
- while (TRUE) {
- e = g_new(XEvent, 1);
- if (XCheckTypedEvent(ob_display, EnterNotify, e)) {
- saved = g_slist_append(saved, e);
- ++n;
- } else {
- g_free(e);
- break;
- }
- }
- /* put the events back */
- for (it = saved; it; it = g_slist_next(it)) {
- XPutBackEvent(ob_display, it->data);
- g_free(it->data);
- }
- g_slist_free(saved);
- /* ignore the events */
- event_ignore_enter_focus(n);
- }
}
ret = TRUE;
}
@@ -128,8 +99,9 @@ gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
else
ret = TRUE;
} else if (pgrabs > 0) {
- if (--pgrabs == 0)
+ if (--pgrabs == 0) {
XUngrabPointer(ob_display, event_lasttime);
+ }
ret = TRUE;
}
return ret;