Merge pull request #68272 from Sauermann/fix-windowfocus-on-resize

Fix Windowfocus on resizing
This commit is contained in:
Rémi Verschelde 2022-11-14 16:38:00 +01:00
commit d639bb87a7
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 0 deletions

View File

@ -2663,6 +2663,11 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
} else {
gui.subwindow_resize_mode = _sub_window_get_resize_margin(sw.window, mb->get_position());
if (gui.subwindow_resize_mode != SUB_WINDOW_RESIZE_DISABLED) {
if (gui.subwindow_focused != sw.window) {
// Refocus.
_sub_window_grab_focus(sw.window);
}
gui.subwindow_resize_from_rect = r;
gui.subwindow_drag_from = mb->get_position();
gui.subwindow_drag = SUB_WINDOW_DRAG_RESIZE;