Add cursor_image_status/set_cursor_image_status to SeatExt
The `cursor_image_status()` function saves some duplication in various places. The `set_cursor_image_status()` saves a bit less, but is also handy.
This commit is contained in:
parent
ddc23fcaa5
commit
fa4bffdbe6
8 changed files with 52 additions and 105 deletions
|
|
@ -1333,8 +1333,7 @@ impl PointerTarget<State> for CosmicStack {
|
|||
.lock()
|
||||
.unwrap();
|
||||
cursor_state.set_shape(next.cursor_shape());
|
||||
let cursor_status = seat.user_data().get::<Mutex<CursorImageStatus>>().unwrap();
|
||||
*cursor_status.lock().unwrap() = CursorImageStatus::default_named();
|
||||
seat.set_cursor_image_status(CursorImageStatus::default_named());
|
||||
});
|
||||
|
||||
event.location -= self.0.with_program(|p| {
|
||||
|
|
@ -1363,8 +1362,7 @@ impl PointerTarget<State> for CosmicStack {
|
|||
.lock()
|
||||
.unwrap();
|
||||
cursor_state.set_shape(next.cursor_shape());
|
||||
let cursor_status = seat.user_data().get::<Mutex<CursorImageStatus>>().unwrap();
|
||||
*cursor_status.lock().unwrap() = CursorImageStatus::default_named();
|
||||
seat.set_cursor_image_status(CursorImageStatus::default_named());
|
||||
});
|
||||
|
||||
let active_window_geo = self.0.with_program(|p| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue