aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-10 11:17:53 (GMT)
committerfluxgen <fluxgen>2003-09-10 11:17:53 (GMT)
commita992dec03ce64d916a9202cb6c533cb60e922367 (patch)
treeffeb9e4ee99b9a2f9ca74f7e8dc92fb1260924ec
parente977ca580b5f50c3f0503f30773c47d97622151b (diff)
downloadfluxbox_paul-a992dec03ce64d916a9202cb6c533cb60e922367.zip
fluxbox_paul-a992dec03ce64d916a9202cb6c533cb60e922367.tar.bz2
fixed workspace mode
-rw-r--r--src/IconbarTool.cc41
1 files changed, 25 insertions, 16 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index fcaac39..7cd7b8e 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.10 2003/09/08 17:52:34 fluxgen Exp $ 23// $Id: IconbarTool.cc,v 1.11 2003/09/10 11:17:53 fluxgen Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -246,17 +246,17 @@ void IconbarTool::setMode(Mode mode) {
246 deleteIcons(); 246 deleteIcons();
247 247
248 // update mode 248 // update mode
249 switch (*m_rc_mode) { 249 switch (mode) {
250 case NONE: 250 case NONE: // nothing
251 break; 251 break;
252 case ICONS: 252 case ICONS: // all icons from all workspaces
253 case WORKSPACEICONS: 253 case WORKSPACEICONS: // all icons on current workspace
254 updateIcons(); 254 updateIcons();
255 break; 255 break;
256 case WORKSPACE: 256 case WORKSPACE: // all windows and all icons on current workspace
257 updateWorkspace(); 257 updateWorkspace();
258 break; 258 break;
259 case ALLWINDOWS: 259 case ALLWINDOWS: // all windows and all icons from all workspaces
260 updateAllWindows(); 260 updateAllWindows();
261 break; 261 break;
262 }; 262 };
@@ -321,7 +321,7 @@ void IconbarTool::update(FbTk::Subject *subj) {
321 removeWindow(winsubj->win()); 321 removeWindow(winsubj->win());
322 renderTheme(); 322 renderTheme();
323 } 323 }
324 } else { 324 } else if (mode() != WORKSPACE) {
325 if (winsubj->win().isIconic()) { 325 if (winsubj->win().isIconic()) {
326 removeWindow(winsubj->win()); 326 removeWindow(winsubj->win());
327 renderTheme(); 327 renderTheme();
@@ -342,10 +342,10 @@ void IconbarTool::update(FbTk::Subject *subj) {
342 if (&m_screen.currentWorkspaceSig() == screen_subj && 342 if (&m_screen.currentWorkspaceSig() == screen_subj &&
343 mode() != ALLWINDOWS && mode() != ICONS) { 343 mode() != ALLWINDOWS && mode() != ICONS) {
344 remove_all = true; // remove and readd all windows 344 remove_all = true; // remove and readd all windows
345 } else if (&m_screen.iconListSig() == screen_subj && 345 }/* else if (&m_screen.iconListSig() == screen_subj &&
346 (mode() == ALLWINDOWS || mode() == ICONS)) { 346 (mode() == ALLWINDOWS || mode() == ICONS || mode() == WORKSPACE)) {
347 remove_all = true; 347 remove_all = true;
348 } 348 }*/
349 } 349 }
350 350
351 // lock graphic update 351 // lock graphic update
@@ -544,13 +544,22 @@ void IconbarTool::updateIcons() {
544 544
545void IconbarTool::updateWorkspace() { 545void IconbarTool::updateWorkspace() {
546 std::list<FluxboxWindow *> itemlist; 546 std::list<FluxboxWindow *> itemlist;
547 // add current workspace windows
547 Workspace &space = *m_screen.currentWorkspace(); 548 Workspace &space = *m_screen.currentWorkspace();
548 Workspace::Windows::iterator it = space.windowList().begin(); 549 Workspace::Windows::iterator win_it = space.windowList().begin();
549 Workspace::Windows::iterator it_end = space.windowList().end(); 550 Workspace::Windows::iterator win_it_end = space.windowList().end();
550 for (; it != it_end; ++it) { 551 for (; win_it != win_it_end; ++win_it) {
551 if (checkAddWindow(mode(), **it)) 552 if (checkAddWindow(mode(), **win_it))
552 itemlist.push_back(*it); 553 itemlist.push_back(*win_it);
553 } 554 }
555 // add icons from current workspace
556 BScreen::Icons::iterator icon_it = m_screen.getIconList().begin();
557 BScreen::Icons::iterator icon_it_end = m_screen.getIconList().end();
558 for (; icon_it != icon_it_end; ++icon_it) {
559 if ((*icon_it)->workspaceNumber() == m_screen.currentWorkspaceID())
560 itemlist.push_back(*icon_it);
561 }
562
554 removeDuplicate(m_icon_list, itemlist); 563 removeDuplicate(m_icon_list, itemlist);
555 addList(itemlist); 564 addList(itemlist);
556} 565}