summaryrefslogtreecommitdiff
path: root/plugins/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-20 22:48:50 +0000
committerDana Jansens <danakj@orodu.net>2003-03-20 22:48:50 +0000
commit6cb4d8bca80cd5338ad03ae02a1b754a4fba41c9 (patch)
tree794737f4778fbedaa4b4bb623e77229cb3ed61bb /plugins/focus.c
parent4f427471b862f2f547981878b1d088ac52929936 (diff)
skip events more smarter
Diffstat (limited to 'plugins/focus.c')
-rw-r--r--plugins/focus.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/focus.c b/plugins/focus.c
index a00a0e93..6a805478 100644
--- a/plugins/focus.c
+++ b/plugins/focus.c
@@ -42,7 +42,7 @@ static void focus_fallback(gboolean switching_desks)
for (it = focus_order[screen_desktop]; it != NULL; it = it->next)
if (client_normal(it->data) && client_focus(it->data)) {
- if (switching_desks && warp_on_desk_switch) {
+ if (switching_desks) {
XEvent e;
Client *c = it->data;
@@ -61,12 +61,14 @@ static void focus_fallback(gboolean switching_desks)
++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);
- XWarpPointer(ob_display, None, c->window, 0, 0, 0, 0,
- c->area.width / 2, c->area.height / 2);
+ if (warp_on_desk_switch) {
+ /* 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);
+ XWarpPointer(ob_display, None, c->window, 0, 0, 0, 0,
+ c->area.width / 2, c->area.height / 2);
+ }
}
break;
}