diff options
author | Hilderin <81109165+Hilderin@users.noreply.github.com> | 2024-08-22 21:36:01 -0400 |
---|---|---|
committer | Hilderin <81109165+Hilderin@users.noreply.github.com> | 2024-08-22 21:36:01 -0400 |
commit | 6cbadcf6062cdb51e26fc79c298bdb0a3fc02e1a (patch) | |
tree | fd159b0dcc0fca6f39e10016a14ffe4bf6070e42 /platform/windows/display_server_windows.cpp | |
parent | 568589c9d8c763bfb3a4348174d53b42d7c59f21 (diff) | |
download | redot-engine-6cbadcf6062cdb51e26fc79c298bdb0a3fc02e1a.tar.gz |
Fix mouse move over an unfocused window
Diffstat (limited to 'platform/windows/display_server_windows.cpp')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index b55eda0e51..62c3f04cba 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -4692,9 +4692,12 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA break; } - DisplayServer::WindowID receiving_window_id = _get_focused_window_or_popup(); - if (receiving_window_id == INVALID_WINDOW_ID) { - receiving_window_id = window_id; + DisplayServer::WindowID receiving_window_id = window_id; + if (mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN) { + receiving_window_id = _get_focused_window_or_popup(); + if (receiving_window_id == INVALID_WINDOW_ID) { + receiving_window_id = window_id; + } } const BitField<WinKeyModifierMask> &mods = _get_mods(); |