diff options
author | fluxgen <fluxgen> | 2004-01-19 18:28:08 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-01-19 18:28:08 (GMT) |
commit | df5d6f30e27eb058c71cf4f3b80e358f35260a2d (patch) | |
tree | 7a9438b966cfa873566c245903dc34e33d1b828e /src | |
parent | 2773c9725e7806d45e09332fd2f9e1c91fe81583 (diff) | |
download | fluxbox_lack-df5d6f30e27eb058c71cf4f3b80e358f35260a2d.zip fluxbox_lack-df5d6f30e27eb058c71cf4f3b80e358f35260a2d.tar.bz2 |
using isHidden attrib in Window
Diffstat (limited to 'src')
-rw-r--r-- | src/IconbarTool.cc | 31 |
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 | ||
190 | inline bool checkAddWindow(IconbarTool::Mode mode, const FluxboxWindow &win) { | 190 | inline 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 | ||
217 | void removeDuplicate(const IconbarTool::IconList &iconlist, std::list<FluxboxWindow *> &windowlist) { | 220 | void 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())) { |