aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-01-14 19:05:34 (GMT)
committermarkt <markt>2007-01-14 19:05:34 (GMT)
commite622927efb135a0fd69d5d2227ae6f532f4ff0c7 (patch)
treed62bebb320522e0bc7860e923127960f2437625a /src/Screen.cc
parent6512024f08e71c10b41040318e7dc0f9a5810224 (diff)
downloadfluxbox-e622927efb135a0fd69d5d2227ae6f532f4ff0c7.zip
fluxbox-e622927efb135a0fd69d5d2227ae6f532f4ff0c7.tar.bz2
stay on same workspace after restart
Diffstat (limited to 'src/Screen.cc')
-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