mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-02-02 14:56:34 +11:00
X11: Fix request_redraw
deadlock while handling RedrawRequested
(#1046)
This commit is contained in:
parent
44af4f4f52
commit
e8e4d4ce66
1 changed files with 4 additions and 2 deletions
|
@ -278,8 +278,10 @@ impl<T: 'static> EventLoop<T> {
|
|||
}
|
||||
// Empty the redraw requests
|
||||
{
|
||||
let mut guard = wt.pending_redraws.lock().unwrap();
|
||||
for wid in guard.drain() {
|
||||
// Release the lock to prevent deadlock
|
||||
let windows: Vec<_> = wt.pending_redraws.lock().unwrap().drain().collect();
|
||||
|
||||
for wid in windows {
|
||||
sticky_exit_callback(
|
||||
Event::WindowEvent {
|
||||
window_id: crate::window::WindowId(super::WindowId::X(wid)),
|
||||
|
|
Loading…
Add table
Reference in a new issue