diff options
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index 24d72bc0..888631e2 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1448,9 +1448,6 @@ impl State { self.niri.handle_focus_follows_mouse(&under); - // Activate a new confinement if necessary. - self.niri.maybe_activate_pointer_constraint(new_pos, &under); - self.niri.pointer_contents.clone_from(&under); pointer.motion( @@ -1475,6 +1472,9 @@ impl State { pointer.frame(self); + // Activate a new confinement if necessary. + self.niri.maybe_activate_pointer_constraint(); + // Redraw to update the cursor position. // FIXME: redraw only outputs overlapping the cursor. self.niri.queue_redraw_all(); @@ -1513,7 +1513,6 @@ impl State { self.niri.handle_focus_follows_mouse(&under); - self.niri.maybe_activate_pointer_constraint(pos, &under); self.niri.pointer_contents.clone_from(&under); pointer.motion( @@ -1528,6 +1527,8 @@ impl State { pointer.frame(self); + self.niri.maybe_activate_pointer_constraint(); + // We moved the pointer, show it. self.niri.pointer_hidden = false; |
