mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(bar): swallow right/middle on hot strip to avoid Qt context-menu SIGSEGV
This commit is contained in:
@@ -45,6 +45,19 @@ PanelWindow {
|
||||
id: triggerArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
// Default MouseArea only accepts left; right/middle would fall through to Qt Quick's
|
||||
// Wayland context-menu delivery, which can SIGSEGV in contextMenuTargets/mapToScene.
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
|
||||
onPressed: function (mouse) {
|
||||
if (mouse.button === Qt.RightButton || mouse.button === Qt.MiddleButton)
|
||||
mouse.accepted = true;
|
||||
}
|
||||
|
||||
onClicked: function (mouse) {
|
||||
if (mouse.button === Qt.RightButton || mouse.button === Qt.MiddleButton)
|
||||
mouse.accepted = true;
|
||||
}
|
||||
|
||||
onEntered: {
|
||||
if (root.isBeingDestroyed)
|
||||
|
||||
Reference in New Issue
Block a user