Fix: deadlock when requesting redraw on X11 (#1408)
This commit is contained in:
parent
1fe4a7a4ea
commit
d934f94704
1 changed files with 1 additions and 2 deletions
|
|
@ -395,7 +395,6 @@ impl<T: 'static> EventLoop<T> {
|
||||||
let mut xev = MaybeUninit::uninit();
|
let mut xev = MaybeUninit::uninit();
|
||||||
|
|
||||||
let wt = get_xtarget(&self.target);
|
let wt = get_xtarget(&self.target);
|
||||||
let mut pending_redraws = wt.pending_redraws.lock().unwrap();
|
|
||||||
|
|
||||||
while unsafe { self.event_processor.poll_one_event(xev.as_mut_ptr()) } {
|
while unsafe { self.event_processor.poll_one_event(xev.as_mut_ptr()) } {
|
||||||
let mut xev = unsafe { xev.assume_init() };
|
let mut xev = unsafe { xev.assume_init() };
|
||||||
|
|
@ -409,7 +408,7 @@ impl<T: 'static> EventLoop<T> {
|
||||||
super::WindowId::X(wid),
|
super::WindowId::X(wid),
|
||||||
)) = event
|
)) = event
|
||||||
{
|
{
|
||||||
pending_redraws.insert(wid);
|
wt.pending_redraws.lock().unwrap().insert(wid);
|
||||||
} else {
|
} else {
|
||||||
callback(event, window_target, control_flow);
|
callback(event, window_target, control_flow);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue