Merge pull request #92458 from bruvzg/dup_cl

[macOS, X11] Fix duplicate close requests.
This commit is contained in:
Rémi Verschelde 2024-05-28 15:50:05 +02:00
commit cc6a7b97d6
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 8 additions and 2 deletions

View File

@ -4206,7 +4206,10 @@ void DisplayServerX11::popup_close(WindowID p_window) {
WindowID win_id = E->get();
popup_list.erase(E);
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], DisplayServerX11::WINDOW_EVENT_CLOSE_REQUEST);
}
E = F;
}
}

View File

@ -3448,7 +3448,10 @@ void DisplayServerMacOS::popup_close(WindowID p_window) {
WindowID win_id = E->get();
popup_list.erase(E);
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()) {