Commit bf30354c authored by Marco Martin's avatar Marco Martin

better behavior of the show desktop button

parent a363da2a
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment