mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
better behavior of the show desktop button
This commit is contained in:
parent
a363da2abe
commit
bf30354c91
4 changed files with 11 additions and 5 deletions
|
|
@ -43,6 +43,4 @@ MouseArea {
|
|||
checked = !checked;
|
||||
}
|
||||
}
|
||||
onPositionChanged: mainMouseArea.positionChanged(mouse);
|
||||
onReleased: mainMouseArea.released(mouse);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ Item {
|
|||
onPressed: delegate.z = 10;
|
||||
onClicked: {
|
||||
window.hide();
|
||||
plasmoid.nativeInterface.windowModel.requestActivate(filteredWindowModel.mapRowToSource(model.index));
|
||||
window.setSingleActiveWindow(model.index);
|
||||
}
|
||||
onReleased: {
|
||||
delegate.z = 0;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ FullScreenPanel {
|
|||
task = filteredWindowModel.get(i);
|
||||
|
||||
if (i == id && task.IsMinimized) {
|
||||
plasmoid.nativeInterface.windowModel.requestToggleMinimized(filteredWindowModel.mapRowToSource(i));
|
||||
//plasmoid.nativeInterface.windowModel.requestToggleMinimized(filteredWindowModel.mapRowToSource(i));
|
||||
plasmoid.nativeInterface.windowModel.requestActivate(filteredWindowModel.mapRowToSource(i));
|
||||
} else if (i != id && !task.IsMinimized) {
|
||||
plasmoid.nativeInterface.windowModel.requestToggleMinimized(filteredWindowModel.mapRowToSource(i));
|
||||
}
|
||||
|
|
@ -204,6 +205,7 @@ FullScreenPanel {
|
|||
}
|
||||
iconSource: "go-home"
|
||||
onClicked: {
|
||||
setSingleActiveWindow(-1);
|
||||
window.hide();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ PlasmaCore.ColorScope {
|
|||
enabled: taskSwitcher.tasksCount > 0
|
||||
iconSource: "window-list"
|
||||
onClicked: taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show();
|
||||
onPositionChanged: mainMouseArea.positionChanged(mouse);
|
||||
onReleased: mainMouseArea.released(mouse);
|
||||
}
|
||||
|
||||
Button {
|
||||
|
|
@ -104,10 +106,12 @@ PlasmaCore.ColorScope {
|
|||
root.taskSwitcher.setSingleActiveWindow(Math.max(0, root.taskSwitcher.currentTaskIndex));
|
||||
}
|
||||
}
|
||||
onPositionChanged: mainMouseArea.positionChanged(mouse);
|
||||
onReleased: mainMouseArea.released(mouse);
|
||||
Connections {
|
||||
target: root.taskSwitcher
|
||||
onCurrentTaskIndexChanged: {
|
||||
showDesktopButton.checked = root.taskSwitcher.currentTaskIndex >= 0
|
||||
showDesktopButton.checked = root.taskSwitcher.currentTaskIndex < 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -119,6 +123,8 @@ PlasmaCore.ColorScope {
|
|||
iconSource: "window-close"
|
||||
enabled: plasmoid.nativeInterface.hasCloseableActiveWindow;
|
||||
onClicked: plasmoid.nativeInterface.closeActiveWindow();
|
||||
onPositionChanged: mainMouseArea.positionChanged(mouse);
|
||||
onReleased: mainMouseArea.released(mouse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue