From f104e43a72380f66f8c517b90326a9209612106d Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 1 Sep 2016 14:06:10 +0200 Subject: 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 --- src/plugins/platforms/winrt/qwinrtinputcontext.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/winrt/qwinrtinputcontext.h') 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; }; -- cgit v1.2.3