aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2020-12-20 16:04:13 +0100
committerGuido Cella <guido@guidocella.xyz>2020-12-20 16:04:13 +0100
commitb161b5d8f4f635ad960d629fa2355c71c231e38a (patch)
tree3b607df589e0b09afad41375a42928244b7d3156 /dwl.c
parent13c7e039bbd823df6ed8475c1ee1cc90a43d729a (diff)
don't notify of activity
...or update selmon when we just want to restore pointer focus.
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index 4fdcc3a..cbf0c11 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1427,11 +1427,14 @@ motionabsolute(struct wl_listener *listener, void *data)
void
motionnotify(uint32_t time)
{
- wlr_idle_notify_activity(idle, seat);
+ // time is 0 in internal calls meant to restore pointer focus.
+ if (time) {
+ wlr_idle_notify_activity(idle, seat);
- /* Update selmon (even while dragging a window) */
- if (sloppyfocus)
- selmon = xytomon(cursor->x, cursor->y);
+ /* Update selmon (even while dragging a window) */
+ if (sloppyfocus)
+ selmon = xytomon(cursor->x, cursor->y);
+ }
/* If we are currently grabbing the mouse, handle and return */
if (cursor_mode == CurMove) {