X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FToolbar.cc;h=955eb5a05223ed47384a204c2e7a2a2f187fa2de;hb=c5d10bd1dda362a41460f91619ae5e85a7665f6f;hp=a2c3442b65562d72438b79bae39808989f396d5d;hpb=1525520dd177f7274ac5e2d2e95c5fa9027e0f48;p=chaz%2Fopenbox diff --git a/src/Toolbar.cc b/src/Toolbar.cc index a2c3442b..955eb5a0 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -53,16 +53,14 @@ using std::string; #include "i18n.hh" #include "blackbox.hh" -#include "Clientmenu.hh" #include "Font.hh" #include "GCCache.hh" -#include "Iconmenu.hh" #include "Image.hh" -#include "Rootmenu.hh" #include "Screen.hh" #include "Toolbar.hh" #include "Window.hh" #include "Workspace.hh" +#include "Clientmenu.hh" #include "Workspacemenu.hh" #include "Slit.hh" @@ -910,19 +908,14 @@ void Toolbar::keyPressEvent(const XKeyEvent *ke) { editing = False; blackbox->setNoFocus(False); - if (blackbox->getFocusedWindow()) { + if (blackbox->getFocusedWindow()) blackbox->getFocusedWindow()->setInputFocus(); - } else { + else blackbox->setFocusedWindow(0); - } - - Workspace *wkspc = screen->getCurrentWorkspace(); - wkspc->setName(new_workspace_name); - wkspc->getMenu()->hide(); - screen->getWorkspacemenu()->changeItemLabel(wkspc->getID() + 2, - wkspc->getName()); - screen->getWorkspacemenu()->update(); + // the toolbar will be reconfigured when the change to the workspace name + // gets caught in the PropertyNotify event handler + screen->getCurrentWorkspace()->setName(new_workspace_name); new_workspace_name.erase(); new_name_pos = 0; @@ -938,7 +931,6 @@ void Toolbar::keyPressEvent(const XKeyEvent *ke) { else XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel); - reconfigure(); } else if (! (ks == XK_Shift_L || ks == XK_Shift_R || ks == XK_Control_L || ks == XK_Control_R || ks == XK_Caps_Lock || ks == XK_Shift_Lock ||