path: root/src/plugins/platforms/winrt/qwinrtinputcontext.h
diff options
authorOliver Wolff <>2016-09-01 14:06:10 +0200
committerMaurice Kalinowski <>2016-09-07 04:54:50 +0000
commitf104e43a72380f66f8c517b90326a9209612106d (patch)
tree1633e8ca794de99667d7fb45869e05f19b724ee1 /src/plugins/platforms/winrt/qwinrtinputcontext.h
parenta5915f260ff882f3e5cf09060ffa007856a0a33f (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 <>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtinputcontext.h')
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();
+private slots:
+ void updateScreenCursorRect();
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;