diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index d0296fa1..78ff485b 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -447,9 +447,9 @@ Item { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/AudioVisualizer.qml b/Modules/Bar/Widgets/AudioVisualizer.qml index c3307b57..1fbefc23 100644 --- a/Modules/Bar/Widgets/AudioVisualizer.qml +++ b/Modules/Bar/Widgets/AudioVisualizer.qml @@ -150,9 +150,9 @@ Item { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } else { const types = ["linear", "mirrored", "wave"]; diff --git a/Modules/Bar/Widgets/Battery.qml b/Modules/Bar/Widgets/Battery.qml index eb0cefa5..8be66f57 100644 --- a/Modules/Bar/Widgets/Battery.qml +++ b/Modules/Bar/Widgets/Battery.qml @@ -175,9 +175,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/Bluetooth.qml b/Modules/Bar/Widgets/Bluetooth.qml index 82f8b2da..1fa1e28d 100644 --- a/Modules/Bar/Widgets/Bluetooth.qml +++ b/Modules/Bar/Widgets/Bluetooth.qml @@ -92,9 +92,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } tooltipText: { diff --git a/Modules/Bar/Widgets/Brightness.qml b/Modules/Bar/Widgets/Brightness.qml index db9612b4..bd0f5d08 100644 --- a/Modules/Bar/Widgets/Brightness.qml +++ b/Modules/Bar/Widgets/Brightness.qml @@ -148,9 +148,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index eda63fdb..43e276e0 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -166,9 +166,9 @@ Rectangle { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } else { PanelService.getPanel("calendarPanel", screen)?.toggle(this); diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index b32782cb..9326e176 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -102,9 +102,9 @@ NIconButton { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } onMiddleClicked: PanelService.getPanel("launcherPanel", screen)?.toggle() diff --git a/Modules/Bar/Widgets/KeyboardLayout.qml b/Modules/Bar/Widgets/KeyboardLayout.qml index 1810e6e5..981985c4 100644 --- a/Modules/Bar/Widgets/KeyboardLayout.qml +++ b/Modules/Bar/Widgets/KeyboardLayout.qml @@ -82,9 +82,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/LockKeys.qml b/Modules/Bar/Widgets/LockKeys.qml index 81b64c8c..1324a6f6 100644 --- a/Modules/Bar/Widgets/LockKeys.qml +++ b/Modules/Bar/Widgets/LockKeys.qml @@ -80,9 +80,9 @@ Rectangle { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 9193a8b3..f1a0d507 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -706,9 +706,9 @@ Item { TooltipService.hide(); var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(mediaMini, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(mediaMini, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } else if (mouse.button === Qt.MiddleButton) { if (hasActivePlayer && MediaService.canGoPrevious) { diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 2da15fe1..3b22ed0e 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -169,9 +169,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } onMiddleClicked: root.openExternalMixer() diff --git a/Modules/Bar/Widgets/NotificationHistory.qml b/Modules/Bar/Widgets/NotificationHistory.qml index 44137df2..29f74b3a 100644 --- a/Modules/Bar/Widgets/NotificationHistory.qml +++ b/Modules/Bar/Widgets/NotificationHistory.qml @@ -102,9 +102,9 @@ NIconButton { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } diff --git a/Modules/Bar/Widgets/SessionMenu.qml b/Modules/Bar/Widgets/SessionMenu.qml index dba3f2be..e287daa1 100644 --- a/Modules/Bar/Widgets/SessionMenu.qml +++ b/Modules/Bar/Widgets/SessionMenu.qml @@ -85,9 +85,9 @@ NIconButton { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 735b9aa4..cc90e431 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -143,9 +143,9 @@ Rectangle { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/VPN.qml b/Modules/Bar/Widgets/VPN.qml index 8beff2b3..261846f2 100644 --- a/Modules/Bar/Widgets/VPN.qml +++ b/Modules/Bar/Widgets/VPN.qml @@ -124,9 +124,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } tooltipText: { diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index 72f453b4..bddd2ef2 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -153,12 +153,9 @@ Item { // Get the shared popup menu window for this screen var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { - // Calculate position using centralized helper (with center-based positioning) - const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); - - // Show the context menu inside the popup window - contextMenu.openAtItem(pill, pos.x, pos.y); popupMenuWindow.showContextMenu(contextMenu); + const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); + contextMenu.openAtItem(pill, pos.x, pos.y); } } onMiddleClicked: root.openExternalMixer() diff --git a/Modules/Bar/Widgets/WallpaperSelector.qml b/Modules/Bar/Widgets/WallpaperSelector.qml index c94c411d..38070466 100644 --- a/Modules/Bar/Widgets/WallpaperSelector.qml +++ b/Modules/Bar/Widgets/WallpaperSelector.qml @@ -57,9 +57,9 @@ NIconButton { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(root, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(root, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } } diff --git a/Modules/Bar/Widgets/WiFi.qml b/Modules/Bar/Widgets/WiFi.qml index 11c41fd6..26f699b7 100644 --- a/Modules/Bar/Widgets/WiFi.qml +++ b/Modules/Bar/Widgets/WiFi.qml @@ -114,9 +114,9 @@ Item { onRightClicked: { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(pill, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(pill, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } tooltipText: { diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index a2f36dbf..8317c521 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -272,9 +272,9 @@ Item { if (mouse.button === Qt.RightButton) { var popupMenuWindow = PanelService.getPopupMenuWindow(screen); if (popupMenuWindow) { + popupMenuWindow.showContextMenu(contextMenu); const pos = BarService.getContextMenuPosition(workspaceBackground, contextMenu.implicitWidth, contextMenu.implicitHeight); contextMenu.openAtItem(workspaceBackground, pos.x, pos.y); - popupMenuWindow.showContextMenu(contextMenu); } } }