mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-10 11:04:10 -04:00
fix: printstatus when selmon changes on cursor motion
This commit is contained in:
parent
b15f7a0e72
commit
032f652f7d
2 changed files with 10 additions and 2 deletions
|
|
@ -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 &&
|
||||||
|
|
|
||||||
|
|
@ -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. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue