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:
@@ -174,8 +174,15 @@ Item {
|
|||||||
_pendingOpen = false;
|
_pendingOpen = false;
|
||||||
_pendingOpenTimer.stop();
|
_pendingOpenTimer.stop();
|
||||||
transientSurfaceTracker?.closeAll?.();
|
transientSurfaceTracker?.closeAll?.();
|
||||||
if (impl.item)
|
if (impl.item) {
|
||||||
impl.item.close();
|
impl.item.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PopoutManager.hidePopout(root);
|
||||||
|
if (!shouldBeVisible)
|
||||||
|
return;
|
||||||
|
shouldBeVisible = false;
|
||||||
|
popoutClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelHoverDismiss() {
|
function cancelHoverDismiss() {
|
||||||
@@ -315,7 +322,8 @@ Item {
|
|||||||
it.hoverDismissEnabled = Qt.binding(() => root.hoverDismissEnabled);
|
it.hoverDismissEnabled = Qt.binding(() => root.hoverDismissEnabled);
|
||||||
it.hoverDismissSuspended = Qt.binding(() => root.effectiveHoverDismissSuspended);
|
it.hoverDismissSuspended = Qt.binding(() => root.effectiveHoverDismissSuspended);
|
||||||
|
|
||||||
it.shouldBeVisible = root.shouldBeVisible;
|
if (root.shouldBeVisible && !_pendingOpen)
|
||||||
|
root.shouldBeVisible = false;
|
||||||
if (root._primeContent && typeof it.primeContent === "function")
|
if (root._primeContent && typeof it.primeContent === "function")
|
||||||
it.primeContent();
|
it.primeContent();
|
||||||
if (_pendingOpen)
|
if (_pendingOpen)
|
||||||
|
|||||||
@@ -923,6 +923,13 @@ Item {
|
|||||||
visible: false
|
visible: false
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (visible || !Qt.inputMethod)
|
||||||
|
return;
|
||||||
|
Qt.inputMethod.hide();
|
||||||
|
Qt.inputMethod.reset();
|
||||||
|
}
|
||||||
|
|
||||||
PopoutHoverDismiss {
|
PopoutHoverDismiss {
|
||||||
id: hoverDismissController
|
id: hoverDismissController
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -630,6 +630,13 @@ Item {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
readonly property bool closeVisualActive: root.shouldBeVisible || root.isClosing
|
readonly property bool closeVisualActive: root.shouldBeVisible || root.isClosing
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (visible || !Qt.inputMethod)
|
||||||
|
return;
|
||||||
|
Qt.inputMethod.hide();
|
||||||
|
Qt.inputMethod.reset();
|
||||||
|
}
|
||||||
|
|
||||||
PopoutHoverDismiss {
|
PopoutHoverDismiss {
|
||||||
id: hoverDismissController
|
id: hoverDismissController
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
Reference in New Issue
Block a user