make show desktop work

use the kwin effect now, use proper api
and never minimize any window
This commit is contained in:
Marco Martin 2016-08-24 17:58:28 +02:00
parent a408c6f41d
commit 6f721b8527
4 changed files with 6 additions and 7 deletions

View file

@ -55,7 +55,6 @@ FullScreenPanel {
scrollAnim.from = tasksView.contentY; scrollAnim.from = tasksView.contentY;
scrollAnim.to = 0; scrollAnim.to = 0;
scrollAnim.running = true; scrollAnim.running = true;
plasmoid.nativeInterface.requestShowingDesktop(true);
} }
function hide() { function hide() {
scrollAnim.from = tasksView.contentY; scrollAnim.from = tasksView.contentY;
@ -200,8 +199,8 @@ FullScreenPanel {
iconSource: "go-home" iconSource: "go-home"
onClicked: { onClicked: {
currentTaskIndex = -1; currentTaskIndex = -1;
plasmoid.nativeInterface.requestShowingDesktop(true);
window.hide(); window.hide();
plasmoid.nativeInterface.showDesktop = true;
} }
} }
} }

View file

@ -104,6 +104,7 @@ PlasmaCore.ColorScope {
enabled: taskSwitcher.tasksCount > 0; enabled: taskSwitcher.tasksCount > 0;
iconSource: "window-list" iconSource: "window-list"
onClicked: { onClicked: {
plasmoid.nativeInterface.showDesktop = false;
taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show(); taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show();
} }
onPressed: mainMouseArea.managePressed(mouse); onPressed: mainMouseArea.managePressed(mouse);
@ -120,11 +121,8 @@ PlasmaCore.ColorScope {
enabled: taskSwitcher.tasksCount > 0 enabled: taskSwitcher.tasksCount > 0
checkable: true checkable: true
onCheckedChanged: { onCheckedChanged: {
if (checked) { taskSwitcher.hide();
root.taskSwitcher.setSingleActiveWindow(-1); plasmoid.nativeInterface.showDesktop = checked;
} else {
root.taskSwitcher.setSingleActiveWindow(root.taskSwitcher.currentTaskIndex);
}
} }
onPressed: mainMouseArea.managePressed(mouse); onPressed: mainMouseArea.managePressed(mouse);
onPositionChanged: mainMouseArea.positionChanged(mouse); onPositionChanged: mainMouseArea.positionChanged(mouse);

View file

@ -6,6 +6,7 @@ Type=Service
X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment X-KDE-ServiceTypes=Plasma/Applet,Plasma/Containment
X-Plasma-API=declarativeappletscript X-Plasma-API=declarativeappletscript
X-KDE-Library=plasma_containment_phone_taskpanel
X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Category=Containments X-KDE-PluginInfo-Category=Containments
X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-Email=mart@kde.org

View file

@ -50,6 +50,7 @@ TaskPanel::~TaskPanel()
void TaskPanel::requestShowingDesktop(bool showingDesktop) void TaskPanel::requestShowingDesktop(bool showingDesktop)
{ {
qWarning()<<"AAAA"<<showingDesktop<<m_windowManagement;
if (!m_windowManagement) { if (!m_windowManagement) {
return; return;
} }