mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
On macOS, fix deadlock during nested event loops (e.g. rfd)
This commit is contained in:
committed by
Kirill Chibisov
parent
0ee26986d8
commit
33a2e4cebd
@@ -12,6 +12,7 @@ Unreleased` header.
|
|||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- On Windows, fix deadlock when accessing the state during `Cursor{Enter,Leave}`.
|
- On Windows, fix deadlock when accessing the state during `Cursor{Enter,Leave}`.
|
||||||
|
- On macOS, fix deadlock when entering a nested event loop from an event handler.
|
||||||
|
|
||||||
# 0.29.2
|
# 0.29.2
|
||||||
|
|
||||||
|
|||||||
@@ -494,9 +494,9 @@ impl AppState {
|
|||||||
|
|
||||||
// Return when in callback due to https://github.com/rust-windowing/winit/issues/1779
|
// Return when in callback due to https://github.com/rust-windowing/winit/issues/1779
|
||||||
if panic_info.is_panicking()
|
if panic_info.is_panicking()
|
||||||
|
|| HANDLER.get_in_callback()
|
||||||
|| !HANDLER.have_callback()
|
|| !HANDLER.have_callback()
|
||||||
|| !HANDLER.is_running()
|
|| !HANDLER.is_running()
|
||||||
|| HANDLER.get_in_callback()
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -601,9 +601,9 @@ impl AppState {
|
|||||||
// XXX: how does it make sense that `get_in_callback()` can ever return `true` here if we're
|
// XXX: how does it make sense that `get_in_callback()` can ever return `true` here if we're
|
||||||
// about to return to the `CFRunLoop` to poll for new events?
|
// about to return to the `CFRunLoop` to poll for new events?
|
||||||
if panic_info.is_panicking()
|
if panic_info.is_panicking()
|
||||||
|
|| HANDLER.get_in_callback()
|
||||||
|| !HANDLER.have_callback()
|
|| !HANDLER.have_callback()
|
||||||
|| !HANDLER.is_running()
|
|| !HANDLER.is_running()
|
||||||
|| HANDLER.get_in_callback()
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user