aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-10-31 07:16:36 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-10-31 07:16:36 +0400
commitd854c2d699b15c68c4715dc6be803065c01f2fe6 (patch)
tree0fd179b12c415503c5dcd2851a43a32b7ac54321 /src/input.rs
parent25e701d9ce7dccc45e94ed1e2573f629df2bdefb (diff)
downloadniri-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.rs12
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 => {