effects/desktopgrid: Close windows on middle click

This makes it so that the windowview/overview/desktopgrid effects
all use the middle mouse button to close windows.

The previous behavior of pinning window is now assigned to the
right mouse button.

BUG: 456144
This commit is contained in:
Felipe Kinoshita 2022-06-30 20:23:17 +00:00
parent 0c453739b1
commit 524e65813b

View file

@ -121,13 +121,14 @@ DropArea {
}
onActivated: effect.deactivate(effect.animationDuration);
onWindowClicked: {
if (eventPoint.event.button !== Qt.MiddleButton) {
return;
}
if (window.desktop > -1) {
window.desktop = -1;
} else {
window.desktop = desktopView.desktop.x11DesktopNumber;
if (eventPoint.event.button === Qt.MiddleButton) {
window.closeWindow();
} else if (eventPoint.event.button === Qt.RightButton) {
if (window.desktop > -1) {
window.desktop = -1;
} else {
window.desktop = desktopView.desktop.x11DesktopNumber;
}
}
}
Behavior on x {