shell: Using parking_lot's RwLock for fairness guarantees

This commit is contained in:
Victoria Brekenfeld 2025-05-20 17:41:27 +02:00 committed by Victoria Brekenfeld
parent 8194be30c6
commit 465813c1c5
42 changed files with 247 additions and 396 deletions

View file

@ -209,7 +209,7 @@ pub fn render_workspace_to_buffer(
frame: Frame,
handle: WorkspaceHandle,
) {
let shell = state.common.shell.read().unwrap();
let shell = state.common.shell.read();
let Some(workspace) = shell.workspaces.space_for_handle(&handle) else {
return;
};
@ -509,7 +509,7 @@ pub fn render_window_to_buffer(
.map(Into::<WindowCaptureElement<R>>::into),
);
let shell = common.shell.read().unwrap();
let shell = common.shell.read();
let seat = shell.seats.last_active().clone();
let location = if let Some(mapped) = shell.element_for_surface(window) {
mapped.cursor_position(&seat).and_then(|mut p| {