aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xevents.c b/xevents.c
index 12fb72b..8cfee2d 100644
--- a/xevents.c
+++ b/xevents.c
@@ -401,6 +401,17 @@ xev_handle_clientmessage(XEvent *ee)
if ((old_cc = client_current(NULL)) != NULL)
client_ptr_save(old_cc);
client_show(cc);
+
+ /*
+ * Only warp the pointer if the source indication field says that
+ * the request to activate another window comes from a pager or
+ * other direct user input.
+ *
+ * This will stop certain dialog windows from repeatedly activating
+ * themselves, effectively jailing the cursor.
+ */
+ if(e->data.l[0] == 2)
+ client_ptr_warp(cc);
}
} else if (e->message_type == ewmh[_NET_WM_DESKTOP]) {
if ((cc = client_find(e->window)) != NULL) {