|
@@ -3448,7 +3448,10 @@ void DisplayServerMacOS::popup_close(WindowID p_window) {
|
|
|
WindowID win_id = E->get();
|
|
|
popup_list.erase(E);
|
|
|
|
|
|
- send_window_event(windows[win_id], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
|
|
+ if (win_id != p_window) {
|
|
|
+ // Only request close on related windows, not this window. We are already processing it.
|
|
|
+ send_window_event(windows[win_id], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
|
|
+ }
|
|
|
E = F;
|
|
|
}
|
|
|
if (!was_empty && popup_list.is_empty()) {
|