aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/plugins.qmltypes16
-rw-r--r--src/virtualkeyboard/content/InputPanel.qml11
-rw-r--r--src/virtualkeyboard/platforminputcontext.cpp2
-rw-r--r--src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp6
4 files changed, 16 insertions, 19 deletions
diff --git a/src/import/plugins.qmltypes b/src/import/plugins.qmltypes
index b0f8537c..71e29c5b 100644
--- a/src/import/plugins.qmltypes
+++ b/src/import/plugins.qmltypes
@@ -1371,7 +1371,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1388,7 +1388,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1405,7 +1405,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1422,7 +1422,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1439,7 +1439,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1456,7 +1456,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1473,7 +1473,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
@@ -1490,7 +1490,7 @@ Module {
isComposite: true
defaultProperty: "data"
Property { name: "externalLanguageSwitchEnabled"; type: "bool" }
- Property { name: "__isRootItem"; type: "bool"; isReadonly: true }
+ Property { name: "desktopPanel"; type: "bool" }
Property { name: "active"; type: "bool" }
Property { name: "keyboard"; type: "Keyboard_QMLTYPE_22"; isReadonly: true; isPointer: true }
Signal {
diff --git a/src/virtualkeyboard/content/InputPanel.qml b/src/virtualkeyboard/content/InputPanel.qml
index ea3ab23f..f511eab2 100644
--- a/src/virtualkeyboard/content/InputPanel.qml
+++ b/src/virtualkeyboard/content/InputPanel.qml
@@ -114,16 +114,13 @@ Item {
property alias keyboard: keyboard
/*! \internal */
- readonly property bool __isRootItem: inputPanel.parent != null && inputPanel.parent.parent == null
-
- /*! \internal */
- property bool __reparented: false
+ property bool desktopPanel: false
SelectionControl {
objectName: "selectionControl"
x: -parent.x
y: -parent.y
- enabled: active && !keyboard.fullScreenMode && (!__isRootItem || __reparented)
+ enabled: active && !keyboard.fullScreenMode && !desktopPanel
}
implicitHeight: keyboard.height
@@ -143,8 +140,8 @@ Item {
target: InputContext.priv
property: "keyboardRectangle"
value: mapToItem(null,
- __isRootItem ? keyboard.x : x,
- (__isRootItem ? keyboard.y : y) + keyboard.wordCandidateView.currentYOffset - (keyboard.shadowInputControl.visible ? keyboard.shadowInputControl.height : 0),
+ desktopPanel ? keyboard.x : x,
+ (desktopPanel ? keyboard.y : y) + keyboard.wordCandidateView.currentYOffset - (keyboard.shadowInputControl.visible ? keyboard.shadowInputControl.height : 0),
keyboard.width,
keyboard.height - keyboard.wordCandidateView.currentYOffset + (keyboard.shadowInputControl.visible ? keyboard.shadowInputControl.height : 0))
when: !InputContext.animating
diff --git a/src/virtualkeyboard/platforminputcontext.cpp b/src/virtualkeyboard/platforminputcontext.cpp
index d57a63e4..eef26574 100644
--- a/src/virtualkeyboard/platforminputcontext.cpp
+++ b/src/virtualkeyboard/platforminputcontext.cpp
@@ -104,6 +104,8 @@ void PlatformInputContext::update(Qt::InputMethodQueries queries)
if (m_inputContext) {
m_selectionControl = new DesktopInputSelectionControl(this, m_inputContext);
m_selectionControl->createHandles();
+ if (QObject *inputPanel = m_inputContext->priv()->inputPanel)
+ inputPanel->setProperty("desktopPanel", true);
}
}
#endif
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
index 2c945356..a7c0aad9 100644
--- a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
+++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp
@@ -273,15 +273,13 @@ void QVirtualKeyboardInputContextPrivate::onInputItemChanged()
if (QObject *item = inputItem()) {
if (QQuickItem *vkbPanel = qobject_cast<QQuickItem*>(inputPanel)) {
if (QQuickItem *quickItem = qobject_cast<QQuickItem*>(item)) {
- const QVariant isRootItem = vkbPanel->property("__isRootItem");
+ const QVariant isDesktopPanel = vkbPanel->property("desktopPanel");
/*
For integrated keyboards, make sure it's a sibling to the overlay. The
high z-order will make sure it gets events also during a modal session.
*/
- if (isRootItem.isValid() && !isRootItem.toBool()) {
+ if (isDesktopPanel.isValid() && !isDesktopPanel.toBool())
vkbPanel->setParentItem(quickItem->window()->contentItem());
- vkbPanel->setProperty("__reparented", true);
- }
}
}
} else {