Skip to content

Commit

Permalink
Don't show the cursor on programmatic movement
Browse files Browse the repository at this point in the history
For keyboard-only use, especially with warp-mouse-to-focus, the
intention is that the cursor stays hidden from keyboard and other
automatic actions, and only shows up with an actual mouse movement.
  • Loading branch information
YaLTeR committed Oct 30, 2024
1 parent 13fe9c8 commit d3e7224
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2043,6 +2043,7 @@ impl State {
self.move_cursor(pos);
}

self.niri.pointer_hidden = false;
self.niri.tablet_cursor_location = None;
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/niri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,7 @@ impl State {
);
pointer.frame(self);

// We moved the pointer, show it.
self.niri.pointer_hidden = false;
self.niri.reset_pointer_inactivity_timer();
// We do not show the pointer on programmatic or keyboard movement.

// FIXME: granular
self.niri.queue_redraw_all();
Expand Down

0 comments on commit d3e7224

Please sign in to comment.