Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion engine/src/mac-core.mm
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,11 @@ bool MCPlatformWaitForEvent(double p_duration, bool p_blocking)
untilDate: [NSDate dateWithTimeIntervalSinceNow: p_duration]
inMode: p_blocking ? NSEventTrackingRunLoopMode : NSDefaultRunLoopMode
dequeue: YES];
if (t_modal)

// Run the modal session, if it has been created yet (it might not if this
// wait was triggered by reacting to an event caused as part of creating
// the modal session, e.g. when losing window focus).
if (t_modal && s_modal_sessions[s_modal_session_count - 1].session != nil)
[NSApp runModalSession: s_modal_sessions[s_modal_session_count - 1] . session];

s_in_blocking_wait = false;
Expand Down