From 18d57034a2cf4493e0f6d6a61f654933bc98ad54 Mon Sep 17 00:00:00 2001 From: Tian Shilin Date: Thu, 12 Mar 2026 13:24:17 +0800 Subject: [PATCH] fix: Resolved user confirmation dialog hierarchy anomaly log: Fixed integration and rollback handling pms: bug-352609 --- qt6/src/qml/DialogWindow.qml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/qt6/src/qml/DialogWindow.qml b/qt6/src/qml/DialogWindow.qml index 075bf35d..c15d9bbc 100644 --- a/qt6/src/qml/DialogWindow.qml +++ b/qt6/src/qml/DialogWindow.qml @@ -33,9 +33,6 @@ Window { property real leftPadding: DS.Style.dialogWindow.contentHMargin property real rightPadding: DS.Style.dialogWindow.contentHMargin - property var transientParentWindow: null - transientParent: transientParentWindow - Item { id: content palette: control.active ? D.DTK.palette : D.DTK.inactivePalette @@ -63,30 +60,6 @@ Window { } } - function updateTransientParent() { - if (control.modality !== Qt.WindowModal) - return - if (!transientParentWindow || transientParentWindow === control) { - var candidate = Qt.application.activeWindow - if (candidate && candidate !== control) - transientParentWindow = candidate - } - } - - Component.onCompleted: { - updateTransientParent() - } - - onVisibleChanged: { - if (!control.visible) - return - updateTransientParent() - Qt.callLater(function () { - control.raise() - control.requestActivate() - }) - } - onClosing: function(close) { // close can't reset sub control's hovered state. pms Bug:168405 // if we need to close, we can add closing handler to set `close.acceped = true`