fix quickshell tray right click stupidly

This commit is contained in:
veneficium 2026-01-07 22:44:39 +01:00
parent 772f030c79
commit 1cf7f41a69

View file

@ -1,3 +1,4 @@
//@ pragma UseQApplication
import Quickshell import Quickshell
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
@ -55,12 +56,24 @@ PanelWindow {
id: hover_handler id: hover_handler
} }
PopupWindow {
id: menu_parent
anchor.item: tray_item
anchor.rect.y: tray_item.height
anchor.rect.x: tray_item.width
visible: true
width: 1
height: 1
color: "transparent"
}
TapHandler { TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onTapped: (eventPoint, button) => { onTapped: (eventPoint, button) => {
if (button == 1) { if (button == 1) {
tray_item.modelData.activate(); tray_item.modelData.activate();
} else { } else {
tray_item.modelData.display(label, 0, 0); tray_item.modelData.display(menu_parent, 0, 0);
} }
} }
} }