diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2018-07-12 13:01:14 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2018-08-06 05:24:35 +0000 |
commit | e05dc08ba02b4a9d893190230c8dfd2554ec4413 (patch) | |
tree | 44e4ecde31d11f5a8568304a45861a59e6b2deb0 /src/plugins/platforms/winrt/qwinrtscreen.h | |
parent | 01e57909d4bce31483d023cf11dd2298391b38f3 (diff) |
winrt: Implement QPlatformCursor::setPos
Additionally to setting the cursor position we have to make sure that
enter and leave events are triggered. As WinRT at the moment only supports
maximized/fullscreen native top level widgets, an enter or leave event has
to be triggered, every time the cursor enters or leaves the core window.
Same as is done on Windows desktop an enter event is immediately followed
by a move event even for emulated mouse events.
Change-Id: I4b9a7b07f8e24b7887619f96979a064d933788aa
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h index fd6499c2b9..6d0d3cdf52 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.h +++ b/src/plugins/platforms/winrt/qwinrtscreen.h @@ -128,6 +128,15 @@ public: void setCursorRect(const QRectF &cursorRect); void setKeyboardRect(const QRectF &keyboardRect); + enum class MousePositionTransition { + MovedOut, + MovedIn, + StayedIn, + StayedOut + }; + + void emulateMouseMove(const QPointF &point, MousePositionTransition transition); + private: void handleExpose(); |