From f57b5b979106ab3a35cdbc82eb792a8caa000092 Mon Sep 17 00:00:00 2001 From: Liu Heng Date: Wed, 11 Dec 2024 17:49:47 +0800 Subject: [PATCH 1/2] fix: protocol error caused by frequent creation and destruction of WaylandOutput. Use a Timer to delay the destruction of WaylandOutpt to avoid frequent creation and destruction of WaylandOutput causing protocol errors log: as title pms: BUG-292367 --- panels/dock/tray/SurfacePopup.qml | 23 ++++++++++++++++++++++- panels/dock/tray/TrayItemSurfacePopup.qml | 22 +++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/panels/dock/tray/SurfacePopup.qml b/panels/dock/tray/SurfacePopup.qml index 1cdf1f581..7832eb8b1 100644 --- a/panels/dock/tray/SurfacePopup.qml +++ b/panels/dock/tray/SurfacePopup.qml @@ -72,8 +72,18 @@ Item { menu.close() } } + + onMenuVisibleChanged: { + if (menuVisible) { + subMenuLoader.active = true + } else { + subMenuLoaderDelayTimer.start() + } + } + Loader { - active: menu.menuVisible + id: subMenuLoader + active: false sourceComponent: SurfaceSubPopup { objectName: "stashed's subPopup" transientParent: menuWindow @@ -83,6 +93,17 @@ Item { return true } } + + // Avoid protocol errors caused by d + Timer { + id: subMenuLoaderDelayTimer + interval: 1000 + repeat: false + running: false + onTriggered: function () { + subMenuLoader.active = false + } + } } } diff --git a/panels/dock/tray/TrayItemSurfacePopup.qml b/panels/dock/tray/TrayItemSurfacePopup.qml index 6bcd8b19e..781b7b0a6 100644 --- a/panels/dock/tray/TrayItemSurfacePopup.qml +++ b/panels/dock/tray/TrayItemSurfacePopup.qml @@ -55,6 +55,14 @@ Item { menuX: DockPositioner.x menuY: DockPositioner.y + onMenuVisibleChanged: { + if (menuVisible) { + subMenuLoader.active = true + } else { + subMenuLoaderDelayTimer.start() + } + } + Item { anchors.fill: parent ShellSurfaceItemProxy { @@ -65,8 +73,20 @@ Item { popupMenu.close() } } + + // Avoid protocol errors caused by frequent creation and destruction of WaylandOutput. + Timer { + id: subMenuLoaderDelayTimer + interval: 1000 + repeat: false + running: false + onTriggered: function () { + subMenuLoader.active = false + } + } Loader { - active: popupMenu.menuVisible + id: subMenuLoader + active: false sourceComponent: SurfaceSubPopup { objectName: "tray's subPopup" transientParent: popupMenu.menuWindow From b535e3f9296853a9cdfeac2246df48830928c6d5 Mon Sep 17 00:00:00 2001 From: Liu Heng Date: Wed, 18 Dec 2024 11:36:44 +0800 Subject: [PATCH 2/2] chore: bump version 1.0.10 log: as title --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a866038e9..c22e41b31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dde-shell (1.0.10) unstable; urgency=medium + + * fix: protocol error caused by frequent creation and destruction of WaylandOutput + + -- tsic404 Wed, 18 Dec 2024 11:35:55 +0800 + dde-shell (1.0.9) unstable; urgency=medium * fix: WeChat and WXChat are recognized as the same