aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/Screen.cc17
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 03a68db..60563ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/14: 3*07/01/14:
4 * Stay on the same workspace after a restart (Mark)
5 Screen.cc
4 * Properly 'properly fix' shaded and stuck windows on restart -- i.e. allow 6 * Properly 'properly fix' shaded and stuck windows on restart -- i.e. allow
5 windows to deiconify themselves the rest of the time (Mark) 7 windows to deiconify themselves the rest of the time (Mark)
6 Window.cc 8 Window.cc
diff --git a/src/Screen.cc b/src/Screen.cc
index a82307d..252df9c 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -460,8 +460,21 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
460 setupConfigmenu(*m_configmenu.get()); 460 setupConfigmenu(*m_configmenu.get());
461 m_configmenu->setInternalMenu(); 461 m_configmenu->setInternalMenu();
462 462
463 // start with workspace 0 463 // check which desktop we should start on
464 changeWorkspaceID(0); 464 unsigned int first_desktop = 0;
465 if (m_restart) {
466 Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False);
467 // other arguments are already defined above
468 if (XGetWindowProperty(disp, m_root_window.window(), net_desktop, 0l,
469 1l, False, XA_CARDINAL, &xa_ret_type, &ret_format, &ret_nitems,
470 &ret_bytes_after, &ret_prop) == Success) {
471 if (ret_prop && (unsigned int) *ret_prop < (unsigned) nr_ws)
472 first_desktop = (unsigned int) *ret_prop;
473 XFree(ret_prop);
474 }
475 }
476
477 changeWorkspaceID(first_desktop);
465 updateNetizenWorkspaceCount(); 478 updateNetizenWorkspaceCount();
466 479
467 // we need to load win frame theme before we create any fluxbox window 480 // we need to load win frame theme before we create any fluxbox window