From b0dc83601b5e5c2bdff4c00ab2a8d66651a7c131 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Wed, 18 Feb 2004 10:16:23 +0000
Subject: change workspace on click

---
 src/IconButton.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/IconButton.cc b/src/IconButton.cc
index a994b7d..b9b41b2 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -20,7 +20,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: IconButton.cc,v 1.17 2004/01/21 14:13:32 fluxgen Exp $
+// $Id: IconButton.cc,v 1.18 2004/02/18 10:16:23 fluxgen Exp $
 
 #include "IconButton.hh"
 
@@ -69,10 +69,11 @@ class FocusCommand: public FbTk::Command {
 public:
     explicit FocusCommand(FluxboxWindow &win):m_win(win) { }
     void execute() {
-       if(m_win.isIconic() || !m_win.isFocused())
-         m_win.raiseAndFocus();
-       else
-         m_win.iconify();
+        if(m_win.isIconic() || !m_win.isFocused()) {
+            m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
+            m_win.raiseAndFocus();
+       } else
+           m_win.iconify();
     }
 private:
     FluxboxWindow &m_win;
-- 
cgit v0.11.2