mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix: Fix inconsistent tray drawer behavior for different mouse buttons
This commit is contained in:
@@ -184,9 +184,15 @@ SmartPanel {
|
||||
if (!modelData.onlyMenu) {
|
||||
modelData.activate();
|
||||
}
|
||||
if ((PanelService.openedPanel !== null) && !PanelService.openedPanel.isClosing) {
|
||||
PanelService.openedPanel.close();
|
||||
}
|
||||
} else if (mouse.button === Qt.MiddleButton) {
|
||||
// Middle click: activate with middle button
|
||||
modelData.secondaryActivate && modelData.secondaryActivate();
|
||||
if ((PanelService.openedPanel !== null) && !PanelService.openedPanel.isClosing) {
|
||||
PanelService.openedPanel.close();
|
||||
}
|
||||
} else if (mouse.button === Qt.RightButton) {
|
||||
// Right click: open context menu
|
||||
TooltipService.hideImmediately();
|
||||
|
||||
Reference in New Issue
Block a user