Commit 524e6581 authored by Felipe Kinoshita's avatar Felipe Kinoshita 🌎
Browse files

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
parent 0c453739
Pipeline #197499 passed with stage
in 20 minutes and 4 seconds
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment