You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Window management improvements.
[macOS] Fix transient windows not working in the full-screen mode. [macOS] Fix moving transient windows to the other screen than parent window. [macOS] Fix popup menu switch on hover. [macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events). [macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected. [macOS/Windows] Fix moving fullscreen windows between the screens. Add auto refocusing of the parent window, when the focused transient window is closed. Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
This commit is contained in:
@@ -281,6 +281,11 @@ void Window::_clear_window() {
|
||||
DisplayServer::get_singleton()->delete_sub_window(window_id);
|
||||
window_id = DisplayServer::INVALID_WINDOW_ID;
|
||||
|
||||
// If closing window was focused and has a parent, return focus.
|
||||
if (focused && transient_parent) {
|
||||
transient_parent->grab_focus();
|
||||
}
|
||||
|
||||
_update_viewport_size();
|
||||
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_DISABLED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user