diff options
author | Ken Moore <moorekou@gmail.com> | 2016-05-13 07:29:12 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-05-13 07:29:12 -0400 |
commit | 947877721904d76b8e4390f1f3e48adb5ed0f484 (patch) | |
tree | 6df0662afe2fb7630bde0be506e29243de70a01a | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
parent | Skip windows with SKIP_TASKBAR state in task manager (diff) | |
download | lumina-947877721904d76b8e4390f1f3e48adb5ed0f484.tar.gz lumina-947877721904d76b8e4390f1f3e48adb5ed0f484.tar.bz2 lumina-947877721904d76b8e4390f1f3e48adb5ed0f484.zip |
Merge pull request #224 from HenryHu/skip_taskbar
Skip windows with SKIP_TASKBAR state in task manager
-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); |