plugins/overview: remove middle click to close virtual desktop

This is a hidden destructive action[1] in a context where users are not
primed to expect it. It's also largely unnecessary since the delegates
already show a delete button on hover, and deleting virtual desktops
isn't such a common task that it benefits from an accelerator. Let's
remove it for safety.

[1] It's destructive because user-created state on the deleted virtual
desktop is lost--with no confirmation or undo, to boot.

BUG: 484999
FIXED-IN: 6.1
This commit is contained in:
Nate Graham 2024-04-11 07:33:09 -06:00
parent 64e0b693c7
commit 99324c12fd

View file

@ -149,17 +149,10 @@ Item {
MouseArea {
id: mouseArea
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
acceptedButtons: Qt.LeftButton
onClicked: mouse => {
mouse.accepted = true;
switch (mouse.button) {
case Qt.LeftButton:
delegate.activate();
break;
case Qt.MiddleButton:
delegate.remove();
break;
}
delegate.activate();
}
}