feat: support cursor shape protocol

This commit is contained in:
Samuel Onoja committed 2026-09-25 00:54:55 +01:00
1 parent df884cb623
commit bab371dc97
2 files changed
+7

No files matched your search

+3
View File
@@ -29,6 +29,7 @@ use smithay::{
PrimarySelectionHandler, PrimarySelectionState, set_primary_focus,
},
},
tablet_manager::TabletSeatHandler,
xdg_foreign::{XdgForeignHandler, XdgForeignState},
},
};
@@ -170,6 +171,7 @@ impl SelectionHandler for Ferese {
impl ClientDndGrabHandler for Ferese {}
impl ServerDndGrabHandler for Ferese {}
impl TabletSeatHandler for Ferese {}
impl DataDeviceHandler for Ferese {
fn data_device_state(&self) -> &DataDeviceState {
@@ -190,6 +192,7 @@ impl XdgForeignHandler for Ferese {
}
smithay::delegate_compositor!(Ferese);
smithay::delegate_cursor_shape!(Ferese);
smithay::delegate_data_device!(Ferese);
smithay::delegate_fractional_scale!(Ferese);
smithay::delegate_idle_inhibit!(Ferese);
+4
View File
@@ -33,6 +33,7 @@ use smithay::{
utils::{Logical, Point, Size},
wayland::{
compositor::{CompositorClientState, CompositorState, with_states},
cursor_shape::CursorShapeManagerState,
fractional_scale::FractionalScaleManagerState,
idle_inhibit::IdleInhibitManagerState,
idle_notify::IdleNotifierState,
@@ -75,6 +76,7 @@ pub struct Ferese {
pub popups: PopupManager,
pub seat: Seat<Self>,
pub compositor_state: CompositorState,
pub cursor_shape_state: CursorShapeManagerState,
pub data_device_state: DataDeviceState,
pub decoration_state: XdgDecorationState,
pub fractional_scale_state: FractionalScaleManagerState,
@@ -102,6 +104,7 @@ impl Ferese {
) -> Result<Self, Box<dyn Error>> {
let display_handle = display.handle();
let compositor_state = CompositorState::new::<Self>(&display_handle);
let cursor_shape_state = CursorShapeManagerState::new::<Self>(&display_handle);
let xdg_shell_state = XdgShellState::new::<Self>(&display_handle);
let decoration_state = XdgDecorationState::new::<Self>(&display_handle);
let fractional_scale_state = FractionalScaleManagerState::new::<Self>(&display_handle);
@@ -152,6 +155,7 @@ impl Ferese {
popups: PopupManager::default(),
seat,
compositor_state,
cursor_shape_state,
data_device_state,
decoration_state,
fractional_scale_state,