diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-03-25 13:37:31 +0000 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-03-26 14:57:45 +0000 |
commit | f451d4800595caf00b6aa61408006cd100a6d416 (patch) | |
tree | 70d194ceb890279872ea3c60d17bfb1051b2185a /src/plugins/platforms/windows/qtwindowsglobal.h | |
parent | eea5a6ea15651a4bc2d0d1b1f45a2542a26083d0 (diff) |
Windows: Add support for horizontal scroll on some touchpads.
While most (all?) touchpads send WM_MOUSEWHEEL for vertical scroll
the story is quite different for horizontal scroll. Some of them
send WM_HSCROLL instead of WM_MOUSEHWHEEL.
Some of them even send left/right key event but those are lost cases.
Task-number: QTBUG-45120
Change-Id: I3bf86e25a6f4f3ba03ac7e89a23f4b7bc432f2de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qtwindowsglobal.h')
-rw-r--r-- | src/plugins/platforms/windows/qtwindowsglobal.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h index 083d82ed8c..74fa561e10 100644 --- a/src/plugins/platforms/windows/qtwindowsglobal.h +++ b/src/plugins/platforms/windows/qtwindowsglobal.h @@ -57,7 +57,8 @@ enum TouchEventFlag = 0x400000, ClipboardEventFlag = 0x800000, ApplicationEventFlag = 0x1000000, - ThemingEventFlag = 0x2000000 + ThemingEventFlag = 0x2000000, + GenericEventFlag = 0x4000000, // Misc }; enum WindowsEventType // Simplify event types @@ -108,6 +109,7 @@ enum WindowsEventType // Simplify event types CompositionSettingsChanged = ThemingEventFlag + 2, DisplayChangedEvent = 437, SettingChangedEvent = DisplayChangedEvent + 1, + ScrollEvent = GenericEventFlag + 1, ContextMenu = 123, GestureEvent = 124, UnknownEvent = 542 @@ -145,6 +147,8 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI return QtWindows::CursorEvent; case WM_MOUSELEAVE: return QtWindows::MouseEvent; + case WM_HSCROLL: + return QtWindows::ScrollEvent; case WM_MOUSEWHEEL: case WM_MOUSEHWHEEL: return QtWindows::MouseWheelEvent; |