aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index c367296..e3fc6c5 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.cc,v 1.30 2004/01/14 23:06:13 fluxgen Exp $ 23// $Id: IconbarTool.cc,v 1.31 2004/01/19 18:28:08 fluxgen Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -188,30 +188,33 @@ void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) {
188} 188}
189 189
190inline bool checkAddWindow(IconbarTool::Mode mode, const FluxboxWindow &win) { 190inline bool checkAddWindow(IconbarTool::Mode mode, const FluxboxWindow &win) {
191 191 bool ret_val = false;
192 // just add the icons that are on the this workspace 192 // just add the icons that are on the this workspace
193 switch (mode) { 193 switch (mode) {
194 case IconbarTool::NONE: 194 case IconbarTool::NONE:
195 break; 195 break;
196 case IconbarTool::ICONS: 196 case IconbarTool::ICONS:
197 if (win.isIconic()) 197 if (win.isIconic())
198 return true; 198 ret_val = true;
199 break; 199 break;
200 case IconbarTool::WORKSPACEICONS: 200 case IconbarTool::WORKSPACEICONS:
201 if(win.workspaceNumber() == win.screen().currentWorkspaceID() && 201 if(win.workspaceNumber() == win.screen().currentWorkspaceID() &&
202 win.isIconic()) 202 win.isIconic())
203 return true; 203 ret_val = true;
204 break; 204 break;
205 case IconbarTool::WORKSPACE: 205 case IconbarTool::WORKSPACE:
206 if (win.workspaceNumber() == win.screen().currentWorkspaceID()) 206 if (win.workspaceNumber() == win.screen().currentWorkspaceID())
207 return true; 207 ret_val = true;
208 break; 208 break;
209 case IconbarTool::ALLWINDOWS: 209 case IconbarTool::ALLWINDOWS:
210 return true; 210 ret_val = true;
211 break; 211 break;
212 } 212 }
213 213
214 return false; 214 if (win.isHidden())
215 ret_val = false;
216
217 return ret_val;
215} 218}
216 219
217void removeDuplicate(const IconbarTool::IconList &iconlist, std::list<FluxboxWindow *> &windowlist) { 220void removeDuplicate(const IconbarTool::IconList &iconlist, std::list<FluxboxWindow *> &windowlist) {
@@ -433,17 +436,11 @@ void IconbarTool::update(FbTk::Subject *subj) {
433 renderTheme(); 436 renderTheme();
434 return; // we don't need to update the entire list 437 return; // we don't need to update the entire list
435 } else if (subj == &(winsubj->win().stateSig())) { 438 } else if (subj == &(winsubj->win().stateSig())) {
436 if (mode() == ICONS || mode() == WORKSPACEICONS) { 439 if (!checkAddWindow(mode(), winsubj->win())) {
437 if (!winsubj->win().isIconic()) { 440 removeWindow(winsubj->win());
438 removeWindow(winsubj->win()); 441 renderTheme();
439 renderTheme();
440 }
441 } else if (mode() != WORKSPACE) {
442 if (winsubj->win().isIconic() && mode() != ALLWINDOWS) {
443 removeWindow(winsubj->win());
444 renderTheme();
445 }
446 } 442 }
443
447 return; 444 return;
448 445
449 } else if (subj == &(winsubj->win().titleSig())) { 446 } else if (subj == &(winsubj->win().titleSig())) {