]> Dogcows Code - chaz/openbox/commitdiff
make sure the desktop names atom is set when setting a workspace name, even when...
authorDana Jansens <danakj@orodu.net>
Sun, 14 Jul 2002 17:30:26 +0000 (17:30 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 14 Jul 2002 17:30:26 +0000 (17:30 +0000)
src/Workspace.cc

index c017d3e505daf5e019fefa5543f6b5d030475b1b..d2a43f440e209d44720ea7852bf378b0335b85b7 100644 (file)
@@ -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);
 
This page took 0.025114 seconds and 4 git commands to generate.