Fix segfault in multithreaded context
Dropping libwayland-client's queue in multithreaded context is safe if and only if there're no alive proxies on it, otherwise it could result in use-after-free. For more see [1] and [2]. [1] - https://gitlab.freedesktop.org/wayland/wayland/-/issues/13 [2] - https://github.com/Smithay/wayland-rs/issues/359
This commit is contained in:
parent
276aa84cf5
commit
f6f5b98235
5 changed files with 88 additions and 42 deletions
|
|
@ -223,7 +223,7 @@ fn process_keyboard_event(event: KeyboardEvent, dispatch_data: &mut DispatchData
|
|||
let contents = dispatch_data
|
||||
.clipboard
|
||||
.load()
|
||||
.unwrap_or_else(|_| String::from("Failed to load primary selection"));
|
||||
.unwrap_or_else(|_| String::from("Failed to load selection"));
|
||||
println!("Paste: {}", contents);
|
||||
}
|
||||
// Copy primary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue