fix: zombie windows when fullscreening and closing (#34378)
This commit is contained in:
parent
93b39b92b5
commit
2cb53c5db1
4 changed files with 46 additions and 5 deletions
|
@ -176,6 +176,10 @@ class NativeWindowMac : public NativeWindow,
|
|||
// Handle fullscreen transitions.
|
||||
void SetFullScreenTransitionState(FullScreenTransitionState state);
|
||||
void HandlePendingFullscreenTransitions();
|
||||
bool HandleDeferredClose();
|
||||
void SetHasDeferredWindowClose(bool defer_close) {
|
||||
has_deferred_window_close_ = defer_close;
|
||||
}
|
||||
|
||||
enum class VisualEffectState {
|
||||
kFollowWindow,
|
||||
|
@ -249,6 +253,12 @@ class NativeWindowMac : public NativeWindow,
|
|||
FullScreenTransitionState fullscreen_transition_state_ =
|
||||
FullScreenTransitionState::NONE;
|
||||
|
||||
// Trying to close an NSWindow during a fullscreen transition will cause the
|
||||
// window to lock up. Use this to track if CloseWindow was called during a
|
||||
// fullscreen transition, to defer the -[NSWindow close] call until the
|
||||
// transition is complete.
|
||||
bool has_deferred_window_close_ = false;
|
||||
|
||||
NSInteger attention_request_id_ = 0; // identifier from requestUserAttention
|
||||
|
||||
// The presentation options before entering kiosk mode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue