diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-31 07:16:36 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-31 07:16:36 +0400 |
| commit | d854c2d699b15c68c4715dc6be803065c01f2fe6 (patch) | |
| tree | 0fd179b12c415503c5dcd2851a43a32b7ac54321 /src/input.rs | |
| parent | 25e701d9ce7dccc45e94ed1e2573f629df2bdefb (diff) | |
| download | niri-d854c2d699b15c68c4715dc6be803065c01f2fe6.tar.gz niri-d854c2d699b15c68c4715dc6be803065c01f2fe6.tar.bz2 niri-d854c2d699b15c68c4715dc6be803065c01f2fe6.zip | |
Change cursor to crosshairs when taking a screenshot
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 12 |
1 files changed, 9 insertions, 3 deletions
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 => { |
