diff options
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r-- | src/Workspace.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index bf914fc..4985c39 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -92,9 +92,15 @@ public: | |||
92 | return; | 92 | return; |
93 | FluxboxWindow &win = *m_client.fbwindow(); | 93 | FluxboxWindow &win = *m_client.fbwindow(); |
94 | 94 | ||
95 | win.screen().changeWorkspaceID(win.workspaceNumber()); | 95 | // fetch the window to the current workspace |
96 | win.setCurrentClient(m_client); | 96 | if (button == 2 && win.screen().currentWorkspaceID() != win.workspaceNumber()) { |
97 | win.raiseAndFocus(); | 97 | win.menu().hide(); |
98 | win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true); | ||
99 | } else { // warp to the workspace of the window | ||
100 | win.screen().changeWorkspaceID(win.workspaceNumber()); | ||
101 | win.setCurrentClient(m_client); | ||
102 | win.raiseAndFocus(); | ||
103 | } | ||
98 | } | 104 | } |
99 | 105 | ||
100 | const std::string &label() const { return m_client.title(); } | 106 | const std::string &label() const { return m_client.title(); } |