summaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 07f55c4..e6d10ff 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1113,6 +1113,12 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
1113 1113
1114 FbTk::App::instance()->sync(false); 1114 FbTk::App::instance()->sync(false);
1115 1115
1116 FluxboxWindow *focused = FocusControl::focusedFbWindow();
1117
1118 if (focused && focused->isMoving() && doOpaqueMove())
1119 // don't reassociate if not opaque moving
1120 reassociateWindow(focused, id, true);
1121
1116 // set new workspace 1122 // set new workspace
1117 Workspace *old = currentWorkspace(); 1123 Workspace *old = currentWorkspace();
1118 m_current_workspace = getWorkspace(id); 1124 m_current_workspace = getWorkspace(id);
@@ -1120,15 +1126,6 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
1120 // we show new workspace first in order to appear faster 1126 // we show new workspace first in order to appear faster
1121 currentWorkspace()->showAll(); 1127 currentWorkspace()->showAll();
1122 1128
1123 FluxboxWindow *focused = FocusControl::focusedFbWindow();
1124
1125 if (focused && focused->isMoving()) {
1126 if (doOpaqueMove())
1127 reassociateWindow(focused, id, true);
1128 // don't reassociate if not opaque moving
1129 focused->pauseMoving();
1130 }
1131
1132 // reassociate all windows that are stuck to the new workspace 1129 // reassociate all windows that are stuck to the new workspace
1133 Workspace::Windows wins = old->windowList(); 1130 Workspace::Windows wins = old->windowList();
1134 Workspace::Windows::iterator it = wins.begin(); 1131 Workspace::Windows::iterator it = wins.begin();
@@ -1145,10 +1142,9 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) {
1145 (*icon_it)->setWorkspace(id); 1142 (*icon_it)->setWorkspace(id);
1146 } 1143 }
1147 1144
1148 if (focused && focused->isMoving()) { 1145 if (focused && focused->isMoving() && doOpaqueMove())
1149 focused->focus(); 1146 focused->focus();
1150 focused->resumeMoving(); 1147 else if (revert)
1151 } else if (revert)
1152 FocusControl::revertFocus(*this); 1148 FocusControl::revertFocus(*this);
1153 1149
1154 old->hideAll(false); 1150 old->hideAll(false);