aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc17
1 files changed, 15 insertions, 2 deletions
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