From 032f652f7dfe255f8f9ab9300972d12b3e692fa3 Mon Sep 17 00:00:00 2001 From: werapi Date: Fri, 20 Mar 2026 13:21:37 +0100 Subject: [PATCH] fix: printstatus when selmon changes on cursor motion --- src/ext-protocol/tablet.h | 6 +++++- src/mango.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ext-protocol/tablet.h b/src/ext-protocol/tablet.h index afa0ebc1..9ad68708 100644 --- a/src/ext-protocol/tablet.h +++ b/src/ext-protocol/tablet.h @@ -278,8 +278,12 @@ void tablettoolmotion(struct TabletTool *tool, bool change_x, bool change_y, motionnotify(0, NULL, 0, 0, 0, 0); - if (config.sloppyfocus) + if (config.sloppyfocus) { + Monitor *oldmon = selmon; selmon = xytomon(cursor->x, cursor->y); + if (oldmon != selmon) + printstatus(IPC_WATCH_MONITOR | IPC_WATCH_ALL_MONITORS); + } xytonode(cursor->x, cursor->y, &surface, &c, NULL, NULL, &sx, &sy); if (cursor_mode == CurPressed && !seat->drag && diff --git a/src/mango.c b/src/mango.c index 1e713046..2865b353 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4998,8 +4998,12 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx, wlr_idle_notifier_v1_notify_activity(idle_notifier, seat); /* Update selmon (even while dragging a window) */ - if (config.sloppyfocus) + if (config.sloppyfocus) { + Monitor *oldmon = selmon; selmon = xytomon(cursor->x, cursor->y); + if (oldmon != selmon) + printstatus(IPC_WATCH_MONITOR | IPC_WATCH_ALL_MONITORS); + } } /* Find the client under the pointer and send the event along. */