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/qwinrtscreen.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h') diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h index 0e753b748b..1862c0afcf 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.h +++ b/src/plugins/platforms/winrt/qwinrtscreen.h @@ -116,6 +116,9 @@ public: void initialize(); + void setCursorRect(const QRectF &cursorRect); + void setKeyboardRect(const QRectF &keyboardRect); + private: void handleExpose(); @@ -140,6 +143,7 @@ private: #endif QScopedPointer d_ptr; + QRectF mCursorRect; Q_DECLARE_PRIVATE(QWinRTScreen) }; -- cgit v1.2.3