From 51bc44bbba340804b005b214145ec344fb7b1412 Mon Sep 17 00:00:00 2001 From: zsien Date: Fri, 5 Jul 2024 16:09:49 +0800 Subject: [PATCH] fix: window is closed after switching mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仅当 visible 为 true 时调用 requestActivate, 调用时机不对导致 active 状态异常 Issues: linuxdeepin/developer-center#9567 --- qml/Main.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qml/Main.qml b/qml/Main.qml index 7ad60a31..6c56e9e8 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -242,7 +242,9 @@ QtObject { DWindow.borderColor: DTK.themeType === ApplicationHelper.DarkType ? Qt.rgba(0, 0, 0, windowedFrameWindow.blendColorAlpha(0.6) + 10 / 255) : Qt.rgba(0, 0, 0, 0.15) onVisibleChanged: { - updateWindowVisibilityAndPosition() + if (visible) { + updateWindowVisibilityAndPosition() + } } onActiveChanged: {