seat: Make render-related state thread-safe
This commit is contained in:
parent
bd58481d19
commit
c7d50e7c5b
11 changed files with 137 additions and 112 deletions
|
|
@ -172,7 +172,8 @@ impl CompositorHandler for State {
|
|||
.user_data()
|
||||
.get::<SeatMoveGrabState>()
|
||||
.unwrap()
|
||||
.borrow()
|
||||
.lock()
|
||||
.unwrap()
|
||||
.as_ref()
|
||||
.and_then(|state| {
|
||||
state
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use smithay::{
|
|||
delegate_seat,
|
||||
input::{keyboard::LedState, pointer::CursorImageStatus, SeatHandler, SeatState},
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
use std::sync::Mutex;
|
||||
|
||||
impl SeatHandler for State {
|
||||
type KeyboardFocus = KeyboardFocusTarget;
|
||||
|
|
@ -27,9 +27,10 @@ impl SeatHandler for State {
|
|||
) {
|
||||
*seat
|
||||
.user_data()
|
||||
.get::<RefCell<CursorImageStatus>>()
|
||||
.get::<Mutex<CursorImageStatus>>()
|
||||
.unwrap()
|
||||
.borrow_mut() = image;
|
||||
.lock()
|
||||
.unwrap() = image;
|
||||
}
|
||||
|
||||
fn focus_changed(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue