all repos — fluxbox @ e622927efb135a0fd69d5d2227ae6f532f4ff0c7

custom fork of the fluxbox windowmanager

stay on same workspace after restart
markt markt
commit

e622927efb135a0fd69d5d2227ae6f532f4ff0c7

parent

6512024f08e71c10b41040318e7dc0f9a5810224

2 files changed, 17 insertions(+), 2 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0rc3: *07/01/14: + * Stay on the same workspace after a restart (Mark) + Screen.cc * Properly 'properly fix' shaded and stuck windows on restart -- i.e. allow windows to deiconify themselves the rest of the time (Mark) Window.cc
M src/Screen.ccsrc/Screen.cc

@@ -460,8 +460,21 @@ "Configuration", "Title of configuration menu")));

setupConfigmenu(*m_configmenu.get()); m_configmenu->setInternalMenu(); - // start with workspace 0 - changeWorkspaceID(0); + // check which desktop we should start on + unsigned int first_desktop = 0; + if (m_restart) { + Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False); + // other arguments are already defined above + if (XGetWindowProperty(disp, m_root_window.window(), net_desktop, 0l, + 1l, False, XA_CARDINAL, &xa_ret_type, &ret_format, &ret_nitems, + &ret_bytes_after, &ret_prop) == Success) { + if (ret_prop && (unsigned int) *ret_prop < (unsigned) nr_ws) + first_desktop = (unsigned int) *ret_prop; + XFree(ret_prop); + } + } + + changeWorkspaceID(first_desktop); updateNetizenWorkspaceCount(); // we need to load win frame theme before we create any fluxbox window