diff options
author | MinusKube <minuskube@gmail.com> | 2022-07-07 21:09:37 +0200 |
---|---|---|
committer | MinusKube <minuskube@gmail.com> | 2022-07-07 21:11:00 +0200 |
commit | 7b05df80292a2e10973d958deb2c395c3dddba7c (patch) | |
tree | 1421cf706b5cef654f20d063f8e2e2d7c3015720 /platform | |
parent | 95ddc8cccc2ad14ff8731b96f3764c88d202f9d3 (diff) |
Move windows display server's 'outside' field to WindowData struct
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 12 | ||||
-rw-r--r-- | platform/windows/display_server_windows.h | 2 |
2 files changed, 6 insertions, 8 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 diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 0429bed3a0..ddbf674c64 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -313,7 +313,6 @@ class DisplayServerWindows : public DisplayServer { int key_event_pos; bool old_invalid; - bool outside; int old_x, old_y; Point2i center; @@ -387,6 +386,7 @@ class DisplayServerWindows : public DisplayServer { Size2 window_rect; Point2 last_pos; + bool mouse_outside = true; ObjectID instance_id; |