Index: src/IconButton.cc =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/IconButton.cc,v retrieving revision 1.18 diff -a -b -B -p -u -r1.18 IconButton.cc --- src/IconButton.cc 18 Feb 2004 10:16:23 -0000 1.18 +++ src/IconButton.cc 3 Mar 2004 13:27:23 -0000 @@ -37,6 +37,15 @@ #include "FbTk/Command.hh" #include "FbTk/RefCount.hh" +#ifdef HAVE_SSTREAM +#include +#define FB_ostringstream std::ostringstream +#elif HAVE_STRSTREAM +#include +#define FB_ostringstream std::ostrstream +#else +#error "You dont have sstream or strstream headers!" +#endif // HAVE_STRSTREAM #ifdef HAVE_CONFIG_H #include "config.h" @@ -70,7 +79,21 @@ public: explicit FocusCommand(FluxboxWindow &win):m_win(win) { } void execute() { if(m_win.isIconic() || !m_win.isFocused()) { + + // get deiconifyMode from resource-database + FB_ostringstream rstring; + rstring << m_win.screen().name() << ".iconbar.deiconifyMode"; + + FbTk::ResourceManager resmanager= m_win.screen().resourceManager(); + FbTk::Resource_base* resource= resmanager.findResource(rstring.str()); + + // if its "Current", popup on the same workspace, + // else on the workspace it was deiconified + if (resource && resource->getString() == "Current" ) + m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win); + else m_win.screen().changeWorkspaceID(m_win.workspaceNumber()); + m_win.raiseAndFocus(); } else m_win.iconify(); Index: src/IconbarTool.cc =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/IconbarTool.cc,v retrieving revision 1.34 diff -a -b -B -p -u -r1.34 IconbarTool.cc --- src/IconbarTool.cc 20 Feb 2004 09:05:24 -0000 1.34 +++ src/IconbarTool.cc 3 Mar 2004 13:27:23 -0000 @@ -244,6 +244,9 @@ IconbarTool::IconbarTool(const FbTk::FbW m_empty_pm(0), m_rc_mode(screen.resourceManager(), WORKSPACE, screen.name() + ".iconbar.mode", screen.altName() + ".Iconbar.Mode"), + m_deiconify_mode(screen.resourceManager(), "Follow", + screen.name() + ".iconbar.deiconifyMode", + screen.name() + ".iconbar.DeiconifyMode"), m_rc_alignment(screen.resourceManager(), Container::LEFT, screen.name() + ".iconbar.alignment", screen.altName() + ".Iconbar.Alignment"), m_rc_client_width(screen.resourceManager(), 70, Index: src/IconbarTool.hh =================================================================== RCS file: /cvsroot/fluxbox/fluxbox/src/IconbarTool.hh,v retrieving revision 1.13 diff -a -b -B -p -u -r1.13 IconbarTool.hh --- src/IconbarTool.hh 23 Dec 2003 01:55:07 -0000 1.13 +++ src/IconbarTool.hh 3 Mar 2004 13:27:23 -0000 @@ -114,6 +114,7 @@ private: IconList m_icon_list; FbTk::Resource m_rc_mode; + FbTk::Resource m_deiconify_mode; ///< is evaluated by iconbutton cmd's FbTk::Resource m_rc_alignment; ///< alignment of buttons FbTk::Resource m_rc_client_width; ///< size of client button in LEFT/RIGHT mode FbTk::Resource m_rc_use_pixmap; ///< if iconbar should use win pixmap or not