diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2016-09-01 14:06:10 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2016-09-07 04:54:50 +0000 |
commit | f104e43a72380f66f8c517b90326a9209612106d (patch) | |
tree | 1633e8ca794de99667d7fb45869e05f19b724ee1 /src/plugins/platforms/winrt/qwinrtinputcontext.h | |
parent | a5915f260ff882f3e5cf09060ffa007856a0a33f (diff) |
winrt: Make sure that cursor is visible when virtual keyboard is shown
We have to check whether the cursor is covered by the virtual keyboard
when it is shown. If that is the case and the keyboard is snapped to the
bottom of the screen the whole content is moved up to ensure the
cursors's visibility.
WinRT's input context had to be moved from the XAML to the GUI thread
as the signal/slot connection does not work otherwise. Signals from
QInputMethod were emitted but not handled in QWinRTInputContext as it
ran on another thread which did not spin an event loop.
Task-number: QTBUG-50291
Change-Id: Id89e970dc194c25ad07ceab14d9fea51bd7388b2
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtinputcontext.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtinputcontext.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.h b/src/plugins/platforms/winrt/qwinrtinputcontext.h index 5e416bb99f..9d5c4187e2 100644 --- a/src/plugins/platforms/winrt/qwinrtinputcontext.h +++ b/src/plugins/platforms/winrt/qwinrtinputcontext.h @@ -79,6 +79,9 @@ public: void hideInputPanel(); #endif +private slots: + void updateScreenCursorRect(); + private: HRESULT onShowing(ABI::Windows::UI::ViewManagement::IInputPane *, ABI::Windows::UI::ViewManagement::IInputPaneVisibilityEventArgs *); @@ -89,6 +92,7 @@ private: QWinRTScreen *m_screen; QRectF m_keyboardRect; + QRectF m_cursorRect; bool m_isInputPanelVisible; }; |