mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
wayland: Fix deadlock in poll_events
This commit is contained in:
parent
c33bedce5e
commit
c2c27c1b37
|
@ -160,6 +160,7 @@ impl EventsLoop {
|
||||||
self.ctxt.dispatch_pending();
|
self.ctxt.dispatch_pending();
|
||||||
evq_guard.dispatch_pending().expect("Wayland connection unexpectedly lost");
|
evq_guard.dispatch_pending().expect("Wayland connection unexpectedly lost");
|
||||||
|
|
||||||
|
{
|
||||||
let mut sink_guard = self.sink.lock().unwrap();
|
let mut sink_guard = self.sink.lock().unwrap();
|
||||||
|
|
||||||
// events where probably dispatched, process resize
|
// events where probably dispatched, process resize
|
||||||
|
@ -169,7 +170,8 @@ impl EventsLoop {
|
||||||
);
|
);
|
||||||
|
|
||||||
// replace the old noop callback
|
// replace the old noop callback
|
||||||
unsafe { self.sink.lock().unwrap().set_callback(old_cb) };
|
unsafe { sink_guard.set_callback(old_cb) };
|
||||||
|
}
|
||||||
|
|
||||||
if self.cleanup_needed.swap(false, ::std::sync::atomic::Ordering::Relaxed) {
|
if self.cleanup_needed.swap(false, ::std::sync::atomic::Ordering::Relaxed) {
|
||||||
self.prune_dead_windows()
|
self.prune_dead_windows()
|
||||||
|
|
Loading…
Reference in a new issue