aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 625e412..3db8ddc 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1199,31 +1199,41 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS
1199 1199
1200 FbTk::App::instance()->sync(false); 1200 FbTk::App::instance()->sync(false);
1201 1201
1202 if (win && &win->screen() == this && 1202 if (!win || &win->screen() != this || win->isStuck())
1203 (! win->isStuck())) { 1203 return;
1204 1204
1205 // if iconified, deiconify it before we send it somewhere 1205 // if iconified, deiconify it before we send it somewhere
1206 if (win->isIconic()) 1206 if (win->isIconic())
1207 win->deiconify(); 1207 win->deiconify();
1208 1208
1209 // if the window isn't on current workspace, hide it 1209 // if the window isn't on current workspace, hide it
1210 if (id != currentWorkspace()->workspaceID()) 1210 if (id != currentWorkspace()->workspaceID())
1211 win->withdraw(true); 1211 win->withdraw(true);
1212 1212
1213 windowMenu().hide(); 1213 windowMenu().hide();
1214 1214
1215 reassociateWindow(win, id, true); 1215 reassociateWindow(win, id, true);
1216 1216
1217 // if the window is on current workspace, show it. 1217 // if the window is on current workspace, show it.
1218 if (id == currentWorkspace()->workspaceID()) 1218 if (id == currentWorkspace()->workspaceID())
1219 win->deiconify(false, false); 1219 win->deiconify(false, false);
1220 1220
1221 // change workspace ? 1221 // change workspace ?
1222 if (changeWS && id != currentWorkspace()->workspaceID()) { 1222 if (changeWS && id != currentWorkspace()->workspaceID()) {
1223 changeWorkspaceID(id); 1223 changeWorkspaceID(id);
1224 win->setInputFocus(); 1224 win->setInputFocus();
1225 } 1225 }
1226 1226
1227 // send all the transients too
1228 FluxboxWindow::ClientList::iterator client_it = win->clientList().begin();
1229 FluxboxWindow::ClientList::iterator client_it_end = win->clientList().end();
1230 for (; client_it != client_it_end; ++client_it) {
1231 WinClient::TransientList::const_iterator it = (*client_it)->transientList().begin();
1232 WinClient::TransientList::const_iterator it_end = (*client_it)->transientList().end();
1233 for (; it != it_end; ++it) {
1234 if ((*it)->fbwindow())
1235 sendToWorkspace(id, (*it)->fbwindow(), false);
1236 }
1227 } 1237 }
1228 1238
1229} 1239}