From: Dana Jansens Date: Sun, 14 Jul 2002 17:30:26 +0000 (+0000) Subject: make sure the desktop names atom is set when setting a workspace name, even when... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=8ff1b7097381bcd20567ea2dd615b4fec84d5a8b;p=chaz%2Fopenbox make sure the desktop names atom is set when setting a workspace name, even when it doesnt already exist (bug fix) --- diff --git a/src/Workspace.cc b/src/Workspace.cc index c017d3e5..d2a43f44 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -71,6 +71,7 @@ Workspace::Workspace(BScreen *scrn, unsigned int i) { lastfocus = (BlackboxWindow *) 0; setName(""); + fprintf(stderr, "WORKSPACE NAME: %s\n", name.c_str()); } @@ -435,12 +436,12 @@ void Workspace::setName(const string& new_name) { XAtom::StringVect namesList; unsigned long numnames = (unsigned) -1; if (xatom->getValue(screen->getRootWindow(), XAtom::net_desktop_names, - XAtom::utf8, numnames, namesList)) { - if (namesList.size() > id) - namesList[id] = name; - else - namesList.push_back(name); - } + XAtom::utf8, numnames, namesList) && + namesList.size() > id) + namesList[id] = name; + else + namesList.push_back(name); + xatom->setValue(screen->getRootWindow(), XAtom::net_desktop_names, XAtom::utf8, namesList);