From 9cea6534573dacb1aa3bb5944d7c0ddac5c48f80 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:47:10 +0100 Subject: Fix mouseleave event after drag and drop in different Windows When dropping in a different window, it is necessary to start tracking the WM_MOUSELEAVE event again. --- platform/windows/display_server_windows.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/windows') diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 9d0a2578fb..d6ee712a31 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2449,6 +2449,10 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA window_mouseover_id = INVALID_WINDOW_ID; _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT); + } else if (window_mouseover_id != INVALID_WINDOW_ID) { + // This is reached during drag and drop, after dropping in a different window. + // Once-off notification, must call again. + track_mouse_leave_event(windows[window_mouseover_id].hWnd); } } break; -- cgit v1.2.3