resize/tiling: Set cursor icons on tool input

This commit is contained in:
Victoria Brekenfeld 2026-08-18 19:23:22 +02:00 • committed by Victoria Brekenfeld
parent f00ff834c9
commit 87d73dbce3

View file

@ -228,20 +228,32 @@ impl TabletToolTarget<State> for ResizeForkTarget {
}
fn proximity_out(
&self,
_seat: &Seat<State>,
seat: &Seat<State>,
_data: &mut State,
_tool_descriptor: &TabletToolDescriptor,
) {
let user_data = seat.user_data();
let cursor_state = user_data.get::<CursorState>().unwrap();
cursor_state.lock().unwrap().unset_shape();
}
fn proximity_in(
&self,
_seat: &Seat<State>,
seat: &Seat<State>,
_data: &mut State,
_tool_descriptor: &TabletToolDescriptor,
_tablet: &Tablet,
_serial: Serial,
) {
let user_data = seat.user_data();
let cursor_state = user_data.get::<CursorState>().unwrap();
cursor_state
.lock()
.unwrap()
.set_shape(match self.orientation {
Orientation::Horizontal => CursorIcon::RowResize,
Orientation::Vertical => CursorIcon::ColResize,
});
}
fn up(
&self,