diff options
author | Henry Hu <henry.hu.sh@gmail.com> | 2016-05-13 01:40:27 -0400 |
---|---|---|
committer | Henry Hu <henry.hu.sh@gmail.com> | 2016-05-13 01:40:27 -0400 |
commit | 9920cf0dc899ddde54198b8e65592ad118c1e91b (patch) | |
tree | 6df0662afe2fb7630bde0be506e29243de70a01a /src-qt5/core | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-9920cf0dc899ddde54198b8e65592ad118c1e91b.tar.gz lumina-9920cf0dc899ddde54198b8e65592ad118c1e91b.tar.bz2 lumina-9920cf0dc899ddde54198b8e65592ad118c1e91b.zip |
Skip windows with SKIP_TASKBAR state in task manager
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp index 3e31a534..79c5dd36 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp @@ -34,6 +34,18 @@ void LTaskManagerPlugin::UpdateButtons(){ //Get the current window list QList<WId> winlist = LSession::handle()->XCB->WindowList(); + // Ignore the windows which don't want to be listed + for (int i = 0; i < winlist.length(); i++) { + QList<LXCB::WINDOWSTATE> states = LSession::handle()->XCB->WM_Get_Window_States(winlist[i]); + for (int j = 0; j < states.length(); j++) { + if (states[j] == LXCB::S_SKIP_TASKBAR) { + // Skip taskbar window + winlist.removeAt(i); + i--; + break; + } + } + } //Do not change the status of the previously active window if it just changed to a non-visible window //WId activeWin = LSession::handle()->XCB->ActiveWindow(); //bool skipActive = !winlist.contains(activeWin); |