From 8ff1b7097381bcd20567ea2dd615b4fec84d5a8b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 14 Jul 2002 17:30:26 +0000 Subject: [PATCH] make sure the desktop names atom is set when setting a workspace name, even when it doesnt already exist (bug fix) --- src/Workspace.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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); -- 2.45.2