From f1ec81b543fe1d5090acff298e24faf10a7bac63 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 19 Sep 2017 13:18:49 +0200 Subject: Windows QPA: Detect screen by mouse position when dragging a window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When dragging a window by its border, detect the screen by mouse position to prevent it from oscillating between screens when it resizes. Task-number: QTBUG-62971 Change-Id: I0a4a584ef8ff3bb7288d1abec4de51fb4091dccd Reviewed-by: Oliver Wolff Reviewed-by: Thorbjørn Lund Martsum --- src/plugins/platforms/windows/qtwindowsglobal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/platforms/windows/qtwindowsglobal.h') diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h index b2152e7ed4..d2e1309280 100644 --- a/src/plugins/platforms/windows/qtwindowsglobal.h +++ b/src/plugins/platforms/windows/qtwindowsglobal.h @@ -101,6 +101,8 @@ enum WindowsEventType // Simplify event types FocusOutEvent = WindowEventFlag + 18, WhatsThisEvent = WindowEventFlag + 19, DpiChangedEvent = WindowEventFlag + 21, + EnterSizeMoveEvent = WindowEventFlag + 22, + ExitSizeMoveEvent = WindowEventFlag + 23, MouseEvent = MouseEventFlag + 1, MouseWheelEvent = MouseEventFlag + 2, CursorEvent = MouseEventFlag + 3, @@ -274,6 +276,10 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI return QtWindows::DeviceChangeEvent; case WM_DPICHANGED: return QtWindows::DpiChangedEvent; + case WM_ENTERSIZEMOVE: + return QtWindows::EnterSizeMoveEvent; + case WM_EXITSIZEMOVE: + return QtWindows::ExitSizeMoveEvent; default: break; } -- cgit v1.2.3