diff options
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r-- | src/Workspace.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index b048480..2ee2768 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -104,15 +104,22 @@ public: | |||
104 | return; | 104 | return; |
105 | FluxboxWindow &win = *m_client.fbwindow(); | 105 | FluxboxWindow &win = *m_client.fbwindow(); |
106 | 106 | ||
107 | // fetch the window to the current workspace | 107 | if (win.screen().currentWorkspaceID() != win.workspaceNumber()) { |
108 | if (button == 2 && win.screen().currentWorkspaceID() != win.workspaceNumber()) { | ||
109 | win.menu().hide(); | 108 | win.menu().hide(); |
110 | win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true); | 109 | BScreen::FollowModel model = win.screen().getUserFollowModel(); |
111 | } else { // warp to the workspace of the window | 110 | if (model == BScreen::IGNORE_OTHER_WORKSPACES) |
112 | win.screen().changeWorkspaceID(win.workspaceNumber()); | 111 | return; |
113 | win.setCurrentClient(m_client); | 112 | // fetch the window to the current workspace |
114 | win.raiseAndFocus(); | 113 | else if ((button == 3) ^ (model == BScreen::FETCH_ACTIVE_WINDOW || |
114 | win.isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW)) { | ||
115 | win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true); | ||
116 | return; | ||
117 | } | ||
118 | // warp to the workspace of the window | ||
119 | win.screen().changeWorkspaceID(win.workspaceNumber()); | ||
115 | } | 120 | } |
121 | win.setCurrentClient(m_client); | ||
122 | win.raiseAndFocus(); | ||
116 | } | 123 | } |
117 | 124 | ||
118 | const std::string &label() const { return m_client.title(); } | 125 | const std::string &label() const { return m_client.title(); } |