diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-14 16:38:00 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-14 16:38:00 +0100 |
commit | d639bb87a715c078710aad47dbf88923ccd4b6e7 (patch) | |
tree | d2e8f71d9dcc474a08f9f6f77b9c523320879c14 /scene/main | |
parent | 40163b9b9f6480a3ba7d99d0fc3277909dd1ff68 (diff) | |
parent | 65647e9c7d69bedfd0f9999e75e8b1ef9d9140fc (diff) |
Merge pull request #68272 from Sauermann/fix-windowfocus-on-resize
Fix Windowfocus on resizing
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ddf9cac7dd..d2be1ce6a7 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -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; |