diff --git a/Modules/Bar/Widgets/Tray.qml b/Modules/Bar/Widgets/Tray.qml index 4c90e332..6c051fb1 100644 --- a/Modules/Bar/Widgets/Tray.qml +++ b/Modules/Bar/Widgets/Tray.qml @@ -173,6 +173,12 @@ Rectangle { function toggleDrawer(button) { TooltipService.hideImmediately() + + // Close the tray menu if it's open + if (trayMenuWindow && trayMenuWindow.visible) { + trayMenuWindow.close() + } + const panel = PanelService.getPanel("trayDrawerPanel", root.screen) if (panel) { panel.widgetSection = root.section @@ -325,6 +331,12 @@ Rectangle { return } + // Close the drawer if it's open (when opening menu for pinned item) + const drawerPanel = PanelService.getPanel("trayDrawerPanel", screen) + if (drawerPanel && drawerPanel.visible) { + drawerPanel.close() + } + if (modelData.hasMenu && modelData.menu && trayMenu.item) { trayMenuWindow.open()