mirror of https://github.com/godotengine/godot
Merge pull request #100637 from bruvzg/unset_fw
Unset last focused window when it is destroyed.
This commit is contained in:
commit
eaed664bce
|
|
@ -1875,6 +1875,10 @@ void DisplayServerX11::delete_sub_window(WindowID p_id) {
|
||||||
window_set_drop_files_callback(Callable(), p_id);
|
window_set_drop_files_callback(Callable(), p_id);
|
||||||
|
|
||||||
windows.erase(p_id);
|
windows.erase(p_id);
|
||||||
|
|
||||||
|
if (last_focused_window == p_id) {
|
||||||
|
last_focused_window = INVALID_WINDOW_ID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
|
int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
|
||||||
|
|
|
||||||
|
|
@ -733,6 +733,10 @@ void DisplayServerMacOS::window_destroy(WindowID p_window) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
windows.erase(p_window);
|
windows.erase(p_window);
|
||||||
|
|
||||||
|
if (last_focused_window == p_window) {
|
||||||
|
last_focused_window = INVALID_WINDOW_ID;
|
||||||
|
}
|
||||||
update_presentation_mode();
|
update_presentation_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue