1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

popout: guard against bad state and reset input method on close

port 1.5
This commit is contained in:
bbedward
2026-07-16 10:19:44 -04:00
parent 9686f29246
commit 3951cd6b18
3 changed files with 24 additions and 2 deletions
+10 -2
View File
@@ -174,8 +174,15 @@ Item {
_pendingOpen = false;
_pendingOpenTimer.stop();
transientSurfaceTracker?.closeAll?.();
if (impl.item)
if (impl.item) {
impl.item.close();
return;
}
PopoutManager.hidePopout(root);
if (!shouldBeVisible)
return;
shouldBeVisible = false;
popoutClosed();
}
function cancelHoverDismiss() {
@@ -315,7 +322,8 @@ Item {
it.hoverDismissEnabled = Qt.binding(() => root.hoverDismissEnabled);
it.hoverDismissSuspended = Qt.binding(() => root.effectiveHoverDismissSuspended);
it.shouldBeVisible = root.shouldBeVisible;
if (root.shouldBeVisible && !_pendingOpen)
root.shouldBeVisible = false;
if (root._primeContent && typeof it.primeContent === "function")
it.primeContent();
if (_pendingOpen)
@@ -923,6 +923,13 @@ Item {
visible: false
color: "transparent"
onVisibleChanged: {
if (visible || !Qt.inputMethod)
return;
Qt.inputMethod.hide();
Qt.inputMethod.reset();
}
PopoutHoverDismiss {
id: hoverDismissController
anchors.fill: parent
@@ -630,6 +630,13 @@ Item {
color: "transparent"
readonly property bool closeVisualActive: root.shouldBeVisible || root.isClosing
onVisibleChanged: {
if (visible || !Qt.inputMethod)
return;
Qt.inputMethod.hide();
Qt.inputMethod.reset();
}
PopoutHoverDismiss {
id: hoverDismissController
anchors.fill: parent