diff options
author | markt <markt> | 2007-01-14 19:05:34 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-14 19:05:34 (GMT) |
commit | e622927efb135a0fd69d5d2227ae6f532f4ff0c7 (patch) | |
tree | d62bebb320522e0bc7860e923127960f2437625a | |
parent | 6512024f08e71c10b41040318e7dc0f9a5810224 (diff) | |
download | fluxbox_lack-e622927efb135a0fd69d5d2227ae6f532f4ff0c7.zip fluxbox_lack-e622927efb135a0fd69d5d2227ae6f532f4ff0c7.tar.bz2 |
stay on same workspace after restart
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/Screen.cc | 17 |
2 files changed, 17 insertions, 2 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes 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 |