summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-13 08:34:30 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-13 08:34:30 -0600
commitddb2073c5cc263840a5dcd1dc0fefc7b489b19e7 (patch)
tree313d836acd4701f014ff9e11f4b6c2f56fc918d3
parent896d3bd0d10dba8f6626dd4e543716e7f2d28bed (diff)
parent6cbadcf6062cdb51e26fc79c298bdb0a3fc02e1a (diff)
downloadredot-engine-ddb2073c5cc263840a5dcd1dc0fefc7b489b19e7.tar.gz
Merge pull request #95972 from Hilderin/fix-mouse-move-over-unfocused-window
Fix mouse move over an unfocused window
-rw-r--r--platform/windows/display_server_windows.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index a6eab1bd29..26dad095ad 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -4792,9 +4792,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();