mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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:
parent
4efc6e29c7
commit
0cbd933e71
1 changed files with 7 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue