From 7fdb918cd04076b173a38f026dc5c27ac830b028 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Fri, 23 May 2025 07:24:24 +0200 Subject: input: do not revert fully invisible cursor to hidden (#1650) * input: do not force redraw to hide an already hidden cursor * more --------- Co-authored-by: Ivan Molodetskikh --- src/input/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input/mod.rs') diff --git a/src/input/mod.rs b/src/input/mod.rs index 1b51895c..0c6cf8f3 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -472,6 +472,12 @@ impl State { } fn hide_cursor_if_needed(&mut self) { + // If the pointer is already invisible, don't reset it back to Hidden causing one frame + // of hover. + if !self.niri.pointer_visibility.is_visible() { + return; + } + if !self.niri.config.borrow().cursor.hide_when_typing { return; } -- cgit