better behavior of the show desktop button

This commit is contained in:
Marco Martin 2015-12-18 14:46:29 +01:00
parent a363da2abe
commit bf30354c91
4 changed files with 11 additions and 5 deletions

View file

@ -43,6 +43,4 @@ MouseArea {
checked = !checked;
}
}
onPositionChanged: mainMouseArea.positionChanged(mouse);
onReleased: mainMouseArea.released(mouse);
}

View file

@ -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;

View file

@ -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();
}
}

View file

@ -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);
}
}
}