From 758cca5432ee87157f6717081cc5e71c09031ea5 Mon Sep 17 00:00:00 2001 From: bogdanov <165584864+bbogdan-ov@users.noreply.github.com> Date: Sun, 27 Apr 2025 06:25:36 +0000 Subject: Fix pointer hiding so that it is no longer annoying (#1426) * replace `pointer_hidden` with `pointer_visiblity` * disable hidden pointer after content underneath has changed * fixes --------- Co-authored-by: Ivan Molodetskikh --- src/handlers/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/handlers') diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index d9b029c5..f2613d19 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -211,7 +211,7 @@ impl PointerConstraintsHandler for State { pointer.set_location(target); // Redraw to update the cursor position if it's visible. - if !self.niri.pointer_hidden { + if self.niri.pointer_visibility.is_visible() { // FIXME: redraw only outputs overlapping the cursor. self.niri.queue_redraw_all(); } @@ -369,7 +369,7 @@ impl ClientDndGrabHandler for State { // parameters from Smithay I guess. // // Assume that hidden pointer means touch DnD. - if !self.niri.pointer_hidden { + if self.niri.pointer_visibility.is_visible() { // We can't even get the current pointer location because it's locked (we're deep // in the grab call stack here). So use the last known one. if let Some(output) = &self.niri.pointer_contents.output { -- cgit