diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-09 19:06:13 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-09 19:06:13 +0400 |
| commit | 7e0d3d31f719615a3da99325d5797a96ae1fa5d2 (patch) | |
| tree | fa1839446cb59f0b852802501745eaaf27191ea6 /src/handlers | |
| parent | e448cfb0efee0efbfc769662ee77ad22a347dc02 (diff) | |
| download | niri-7e0d3d31f719615a3da99325d5797a96ae1fa5d2.tar.gz niri-7e0d3d31f719615a3da99325d5797a96ae1fa5d2.tar.bz2 niri-7e0d3d31f719615a3da99325d5797a96ae1fa5d2.zip | |
Update Smithay
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/mod.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index f87d494c..ae2b4499 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -10,6 +10,7 @@ use std::thread; use smithay::backend::allocator::dmabuf::Dmabuf; use smithay::backend::drm::DrmNode; +use smithay::backend::input::TabletToolDescriptor; use smithay::desktop::{PopupKind, PopupManager}; use smithay::input::pointer::{CursorIcon, CursorImageStatus, PointerHandle}; use smithay::input::{keyboard, Seat, SeatHandler, SeatState}; @@ -45,6 +46,7 @@ use smithay::wayland::selection::{SelectionHandler, SelectionTarget}; use smithay::wayland::session_lock::{ LockSurface, SessionLockHandler, SessionLockManagerState, SessionLocker, }; +use smithay::wayland::tablet_manager::TabletSeatHandler; use smithay::{ delegate_cursor_shape, delegate_data_control, delegate_data_device, delegate_dmabuf, delegate_drm_lease, delegate_idle_inhibit, delegate_idle_notify, delegate_input_method_manager, @@ -105,11 +107,20 @@ impl SeatHandler for State { } delegate_seat!(State); delegate_cursor_shape!(State); -delegate_tablet_manager!(State); delegate_pointer_gestures!(State); delegate_relative_pointer!(State); delegate_text_input_manager!(State); +impl TabletSeatHandler for State { + fn tablet_tool_image(&mut self, _tool: &TabletToolDescriptor, image: CursorImageStatus) { + // FIXME: tablet tools should have their own cursors. + self.niri.cursor_manager.set_cursor_image(image); + // FIXME: granular. + self.niri.queue_redraw_all(); + } +} +delegate_tablet_manager!(State); + impl PointerConstraintsHandler for State { fn new_constraint(&mut self, _surface: &WlSurface, pointer: &PointerHandle<Self>) { self.niri.maybe_activate_pointer_constraint( |
