fix: printstatus when selmon changes on cursor motion

This commit is contained in:
werapi 2026-03-20 13:21:37 +01:00
parent b15f7a0e72
commit 032f652f7d
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); motionnotify(0, NULL, 0, 0, 0, 0);
if (config.sloppyfocus) if (config.sloppyfocus) {
Monitor *oldmon = selmon;
selmon = xytomon(cursor->x, cursor->y); 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); xytonode(cursor->x, cursor->y, &surface, &c, NULL, NULL, &sx, &sy);
if (cursor_mode == CurPressed && !seat->drag && 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); wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
/* Update selmon (even while dragging a window) */ /* Update selmon (even while dragging a window) */
if (config.sloppyfocus) if (config.sloppyfocus) {
Monitor *oldmon = selmon;
selmon = xytomon(cursor->x, cursor->y); 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. */ /* Find the client under the pointer and send the event along. */