mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
X11: Fix request_redraw deadlock while handling RedrawRequested (#1046)
This commit is contained in:
@@ -278,8 +278,10 @@ impl<T: 'static> EventLoop<T> {
|
|||||||
}
|
}
|
||||||
// Empty the redraw requests
|
// Empty the redraw requests
|
||||||
{
|
{
|
||||||
let mut guard = wt.pending_redraws.lock().unwrap();
|
// Release the lock to prevent deadlock
|
||||||
for wid in guard.drain() {
|
let windows: Vec<_> = wt.pending_redraws.lock().unwrap().drain().collect();
|
||||||
|
|
||||||
|
for wid in windows {
|
||||||
sticky_exit_callback(
|
sticky_exit_callback(
|
||||||
Event::WindowEvent {
|
Event::WindowEvent {
|
||||||
window_id: crate::window::WindowId(super::WindowId::X(wid)),
|
window_id: crate::window::WindowId(super::WindowId::X(wid)),
|
||||||
|
|||||||
Reference in New Issue
Block a user