summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index fe4c5be4cb..fb33ad6e21 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -438,6 +438,16 @@ QAndroidInputContext::QAndroidInputContext()
QObject::connect(QGuiApplication::inputMethod(), &QInputMethod::cursorRectangleChanged,
this, &QAndroidInputContext::updateSelectionHandles);
+ QObject::connect(QGuiApplication::inputMethod(), &QInputMethod::anchorRectangleChanged,
+ this, &QAndroidInputContext::updateSelectionHandles);
+ QObject::connect(QGuiApplication::inputMethod(), &QInputMethod::inputItemClipRectangleChanged, this, [this]{
+ auto im = qGuiApp->inputMethod();
+ if (!im->inputItemClipRectangle().contains(im->anchorRectangle()) ||
+ !im->inputItemClipRectangle().contains(im->cursorRectangle())) {
+ m_cursorHandleShown = CursorHandleNotShown;
+ updateSelectionHandles();
+ }
+ });
}
QAndroidInputContext::~QAndroidInputContext()