Merge pull request #1139 from WeraPea/printstatus-selmon-cursor-motion

fix: printstatus when selmon changes on cursor motion
This commit is contained in:
DreamMaoMao 2026-07-09 08:12:44 +08:00 committed by GitHub
commit 8c1ab81437
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -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 &&

View file

@ -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. */