diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-30 07:44:08 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-30 07:44:08 -0400 |
commit | c02fac06e23039e2a1097950adb3177a4d24203a (patch) | |
tree | 23ae0274d54a050b45faac104a21adfadc97cc62 /src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | |
parent | Tag version 1.0.0-Devel on the source tree (master branch) (diff) | |
parent | Create a directory for placing sample JSON menu generation scripts, and add o... (diff) | |
download | lumina-c02fac06e23039e2a1097950adb3177a4d24203a.tar.gz lumina-c02fac06e23039e2a1097950adb3177a4d24203a.tar.bz2 lumina-c02fac06e23039e2a1097950adb3177a4d24203a.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index 7e2e53de..0dd68bb0 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -157,6 +157,12 @@ void LTaskButton::UpdateMenus(){ } } actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close Window"), this, SLOT(closeWindow()) ); + if(WINLIST.length()>1 && !winMenu->isVisible()){ + actMenu->addSeparator(); + actMenu->addAction( LXDG::findIcon("layer-visible-on",""), tr("Show All Windows"), this, SLOT(showAllWindows()) ); + actMenu->addAction( LXDG::findIcon("layer-visible-off",""), tr("Minimize All Windows"), this, SLOT(hideAllWindows()) ); + actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close All Windows"), this, SLOT(closeAllWindows()) ); + } } //============= @@ -196,6 +202,29 @@ void LTaskButton::minimizeWindow(){ QTimer::singleShot(100, this, SLOT(UpdateButton()) ); //make sure to update this button if losing active status } +void LTaskButton::showAllWindows(){ + for(int i=WINLIST.length()-1; i>=0; i--){ + if(WINLIST[i].status()==LXCB::INVISIBLE){ + LSession::handle()->XCB->RestoreWindow(WINLIST[i].windowID()); + } + } +} + +void LTaskButton::hideAllWindows(){ + for(int i=WINLIST.length()-1; i>=0; i--){ + LXCB::WINDOWVISIBILITY state = WINLIST[i].status(); + if(state==LXCB::VISIBLE || state==LXCB::ACTIVE){ + LSession::handle()->XCB->MinimizeWindow(WINLIST[i].windowID()); + } + } +} + +void LTaskButton::closeAllWindows(){ + for(int i=WINLIST.length()-1; i>=0; i--){ + LSession::handle()->XCB->CloseWindow(WINLIST[i].windowID()); + } +} + void LTaskButton::triggerWindow(){ LWinInfo win = currentWindow(); //Check which state the window is currently in and flip it to the other |