diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-07-13 14:13:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 14:13:16 +0200 |
commit | 19b10e27846263e91d019c184c1c40b1947b7fe2 (patch) | |
tree | 5425b52f213de411c9bc1043a015e357f31f31c2 /platform/windows/display_server_windows.cpp | |
parent | 9b29f1863163a20b8fb05b3e260c11365c7cd25b (diff) | |
parent | 7b05df80292a2e10973d958deb2c395c3dddba7c (diff) | |
download | redot-engine-19b10e27846263e91d019c184c1c40b1947b7fe2.tar.gz |
Merge pull request #62824 from MinusKube/haunted-editor-bug
Fix haunted editor bug causing weird issues with mouse behaviour
Diffstat (limited to 'platform/windows/display_server_windows.cpp')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index e66fa142a7..91e0fbe0dc 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2382,7 +2382,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } case WM_MOUSELEAVE: { old_invalid = true; - outside = true; + windows[window_id].mouse_outside = true; _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT); @@ -2612,7 +2612,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } } - if (outside) { + if (windows[window_id].mouse_outside) { // Mouse enter. if (mouse_mode != MOUSE_MODE_CAPTURED) { @@ -2622,7 +2622,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; cursor_set_shape(c); - outside = false; + windows[window_id].mouse_outside = false; // Once-off notification, must call again. track_mouse_leave_event(hWnd); @@ -2713,7 +2713,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } } - if (outside) { + if (windows[window_id].mouse_outside) { // Mouse enter. if (mouse_mode != MOUSE_MODE_CAPTURED) { @@ -2723,7 +2723,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; cursor_set_shape(c); - outside = false; + windows[window_id].mouse_outside = false; // Once-off notification, must call again. track_mouse_leave_event(hWnd); @@ -3608,8 +3608,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win old_invalid = true; mouse_mode = MOUSE_MODE_VISIBLE; - outside = true; - rendering_driver = p_rendering_driver; // Init TTS |