Guard against infinite loop in focus handling (#4023)
Release Notes: - Fix an infinite loop in focus handling
This commit is contained in:
commit
51cc6b1e1c
1 changed files with 3 additions and 3 deletions
|
@ -1429,9 +1429,6 @@ impl<'a> WindowContext<'a> {
|
||||||
self.platform.set_cursor_style(cursor_style);
|
self.platform.set_cursor_style(cursor_style);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.window.drawing = false;
|
|
||||||
ELEMENT_ARENA.with_borrow_mut(|element_arena| element_arena.clear());
|
|
||||||
|
|
||||||
if previous_focus_path != current_focus_path
|
if previous_focus_path != current_focus_path
|
||||||
|| previous_window_active != current_window_active
|
|| previous_window_active != current_window_active
|
||||||
{
|
{
|
||||||
|
@ -1460,6 +1457,9 @@ impl<'a> WindowContext<'a> {
|
||||||
.retain(&(), |listener| listener(&event, self));
|
.retain(&(), |listener| listener(&event, self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.window.drawing = false;
|
||||||
|
ELEMENT_ARENA.with_borrow_mut(|element_arena| element_arena.clear());
|
||||||
|
|
||||||
scene
|
scene
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue