From 5e72fdf038dfe55be249095babea3add76a27b81 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 26 May 2026 21:15:39 +0100 Subject: [PATCH] quickshell: fix tray hover switching same contextMenu dropdown When hovering between tray icons, update menu content in-place instead of calling toggleDropdown which closes the visible menu. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index a2e8a80..8046d3b 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -1007,12 +1007,21 @@ in if (bar.activeDropdown) { bar.activeDropdown.resetAutoClose(); if (modelData.hasMenu && !(bar.activeDropdown === contextMenu && contextMenu.trayItem === modelData)) { - bar.toggleDropdown(contextMenu, function() { + if (bar.activeDropdown === contextMenu) { + // Same dropdown, just switch content let pos = parent.mapToItem(bar.contentItem, parent.width / 2, 0); contextMenu.dropdownX = pos.x; contextMenu.trayItem = modelData; menuOpener.menu = modelData.menu; - }); + contextMenu.resetAutoClose(); + } else { + bar.toggleDropdown(contextMenu, function() { + let pos = parent.mapToItem(bar.contentItem, parent.width / 2, 0); + contextMenu.dropdownX = pos.x; + contextMenu.trayItem = modelData; + menuOpener.menu = modelData.menu; + }); + } } } }