summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-20 22:24:27 +0000
committerDana Jansens <danakj@orodu.net>2003-03-20 22:24:27 +0000
commitd2b4e7ddca275b5be50db0365aba734c0fb28b1e (patch)
tree709b4649ddf733535ea7e1344d1f8c9af6814251
parentbb7427422cc07cb9b31ce643b9bde75454f8d844 (diff)
skipping the right number of enters now i think
-rw-r--r--plugins/focus.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/focus.c b/plugins/focus.c
index d5774aed..43f0ae8e 100644
--- a/plugins/focus.c
+++ b/plugins/focus.c
@@ -48,19 +48,16 @@ static void focus_fallback(gboolean switching_desks)
/* skip the next enter event from the desktop switch so focus
doesn't skip briefly to what was under the pointer */
- while (XCheckTypedEvent(ob_display, EnterNotify, &e));
-/*
+ if (XCheckTypedEvent(ob_display, EnterNotify, &e)) {
XPutBackEvent(ob_display, &e);
- /\* XXX WERE NOT SKIPPING THEM ALL@&*)! *\/
- g_message("Skip");
++skip_enter;
}
-*/
/* I have to do this warp twice! Otherwise windows dont get
Enter/Leave events when i warp on a desktop switch! */
XWarpPointer(ob_display, None, c->window, 0, 0, 0, 0,
c->area.width / 2, c->area.height / 2);
+ ++skip_enter;
XWarpPointer(ob_display, None, c->window, 0, 0, 0, 0,
c->area.width / 2, c->area.height / 2);
}