aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 541b30a..720efed 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1201,6 +1201,13 @@ void BScreen::changeWorkspaceID(unsigned int id) {
1201 1201
1202 FbTk::App::instance()->sync(false); 1202 FbTk::App::instance()->sync(false);
1203 1203
1204 // set new workspace
1205 Workspace *old = currentWorkspace();
1206 m_current_workspace = getWorkspace(id);
1207
1208 // we show new workspace first in order to appear faster
1209 currentWorkspace()->showAll();
1210
1204 FluxboxWindow *focused = FocusControl::focusedFbWindow(); 1211 FluxboxWindow *focused = FocusControl::focusedFbWindow();
1205 1212
1206 if (focused && focused->isMoving()) { 1213 if (focused && focused->isMoving()) {
@@ -1227,28 +1234,14 @@ void BScreen::changeWorkspaceID(unsigned int id) {
1227 (*icon_it)->setWorkspace(id); 1234 (*icon_it)->setWorkspace(id);
1228 } 1235 }
1229 1236
1230 currentWorkspace()->hideAll(false);
1231
1232 // set new workspace
1233 m_current_workspace = getWorkspace(id);
1234
1235 // This is a little tricks to reduce flicker
1236 // this way we can set focus pixmap on frame before we show it
1237 // and using ExposeEvent to redraw without flicker
1238 /*
1239 WinClient *win = getLastFocusedWindow(currentWorkspaceID());
1240 if (win && win->fbwindow())
1241 win->fbwindow()->setFocusFlag(true);
1242 */
1243
1244 currentWorkspace()->showAll();
1245
1246 if (focused && focused->isMoving()) { 1237 if (focused && focused->isMoving()) {
1247 focused->focus(); 1238 focused->focus();
1248 focused->resumeMoving(); 1239 focused->resumeMoving();
1249 } else 1240 } else
1250 FocusControl::revertFocus(*this); 1241 FocusControl::revertFocus(*this);
1251 1242
1243 old->hideAll(false);
1244
1252 FbTk::App::instance()->sync(false); 1245 FbTk::App::instance()->sync(false);
1253 1246
1254 m_currentworkspace_sig.notify(); 1247 m_currentworkspace_sig.notify();