From d854c2d699b15c68c4715dc6be803065c01f2fe6 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 31 Oct 2023 07:16:36 +0400 Subject: Change cursor to crosshairs when taking a screenshot --- src/input.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index f157d63b..71197d82 100644 --- a/src/input.rs +++ b/src/input.rs @@ -10,9 +10,9 @@ use smithay::backend::input::{ use smithay::backend::libinput::LibinputInputBackend; use smithay::input::keyboard::{keysyms, FilterResult, Keysym, ModifiersState}; use smithay::input::pointer::{ - AxisFrame, ButtonEvent, GestureHoldBeginEvent, GestureHoldEndEvent, GesturePinchBeginEvent, - GesturePinchEndEvent, GesturePinchUpdateEvent, GestureSwipeBeginEvent, GestureSwipeEndEvent, - GestureSwipeUpdateEvent, MotionEvent, RelativeMotionEvent, + AxisFrame, ButtonEvent, CursorImageStatus, GestureHoldBeginEvent, GestureHoldEndEvent, + GesturePinchBeginEvent, GesturePinchEndEvent, GesturePinchUpdateEvent, GestureSwipeBeginEvent, + GestureSwipeEndEvent, GestureSwipeUpdateEvent, MotionEvent, RelativeMotionEvent, }; use smithay::utils::SERIAL_COUNTER; use smithay::wayland::tablet_manager::{TabletDescriptor, TabletSeatTrait}; @@ -146,10 +146,16 @@ impl State { } self.niri.screenshot_ui.close(); + self.niri + .cursor_manager + .set_cursor_image(CursorImageStatus::default_named()); self.niri.queue_redraw_all(); } Action::CancelScreenshot => { self.niri.screenshot_ui.close(); + self.niri + .cursor_manager + .set_cursor_image(CursorImageStatus::default_named()); self.niri.queue_redraw_all(); } Action::Screenshot => { -- cgit