mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
Middle clock to close window on dock
This commit is contained in:
@@ -322,7 +322,21 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mouse.button === Qt.MiddleButton) {
|
} else if (mouse.button === Qt.MiddleButton) {
|
||||||
if (appData && appData.appId) {
|
if (appData && appData.type === "window") {
|
||||||
|
const sortedToplevels = CompositorService.sortedToplevels
|
||||||
|
for (var i = 0; i < sortedToplevels.length; i++) {
|
||||||
|
const toplevel = sortedToplevels[i]
|
||||||
|
const checkId = toplevel.title + "|" + (toplevel.appId || "") + "|" + i
|
||||||
|
if (checkId === appData.uniqueId) {
|
||||||
|
toplevel.close()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (appData && appData.type === "grouped") {
|
||||||
|
if (contextMenu) {
|
||||||
|
contextMenu.showForButton(root, appData, 40, false, cachedDesktopEntry)
|
||||||
|
}
|
||||||
|
} else if (appData && appData.appId) {
|
||||||
const desktopEntry = cachedDesktopEntry
|
const desktopEntry = cachedDesktopEntry
|
||||||
if (desktopEntry) {
|
if (desktopEntry) {
|
||||||
AppUsageHistoryData.addAppUsage({
|
AppUsageHistoryData.addAppUsage({
|
||||||
@@ -333,7 +347,7 @@ Item {
|
|||||||
"comment": desktopEntry.comment || ""
|
"comment": desktopEntry.comment || ""
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
SessionService.launchDesktopEntry(desktopEntry)
|
SessionService.launchDesktopEntry(desktopEntry)
|
||||||
}
|
}
|
||||||
} else if (mouse.button === Qt.RightButton) {
|
} else if (mouse.button === Qt.RightButton) {
|
||||||
if (contextMenu && appData) {
|
if (contextMenu && appData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user