Add middle-click to close running dock tasks

Middle-click on a running task in the dock now closes it, matching
standard desktop taskbar behavior.
This commit is contained in:
Marco Allegretti 2026-04-13 11:16:08 +02:00
parent 4efc6e29c7
commit 0cbd933e71

View file

@ -812,13 +812,18 @@ MouseArea {
}
}
// Click to activate, hover for thumbnail preview
// Click to activate, middle-click to close, hover for thumbnail preview
MouseArea {
id: taskMouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
onClicked: (mouse) => {
if (mouse.button === Qt.MiddleButton) {
thumbnailPopup.close()
tasksModel.requestClose(tasksModel.makeModelIndex(taskDelegate.index));
return
}
if (mouse.button === Qt.RightButton) {
thumbnailPopup.close()
thumbnailShowTimer.stop()