From 601ae51604441e9b2d6ffea72f9336cc02934a99 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 15 Jul 2004 18:23:03 +0000 Subject: resource bool fix and setting input focus on menus when we bring them up with the mouse --- src/fluxbox.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 377c78a..291e62e 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.247 2004/07/15 13:42:50 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.248 2004/07/15 18:23:03 fluxgen Exp $ #include "fluxbox.hh" @@ -159,14 +159,9 @@ setFromString(const char *strval) { template<> void FbTk::Resource:: setFromString(char const *strval) { - if (strcasecmp(strval, "true")==0) - *this = true; - else - *this = false; + *this = (bool)!strcasecmp(strval, "true"); } - - template<> void FbTk::Resource:: setFromString(char const *strval) { @@ -1117,6 +1112,7 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { if (! screen->getWorkspacemenu().isVisible()) { screen->getWorkspacemenu().removeParent(); screen->getWorkspacemenu().show(); + screen->getWorkspacemenu().grabInputFocus(); } } else if (be.button == 3) { //calculate placement of root menu @@ -1147,6 +1143,7 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { if (! screen->getRootmenu().isVisible()) { checkMenu(); screen->getRootmenu().show(); + screen->getRootmenu().grabInputFocus(); } } else if (screen->isDesktopWheeling() && be.button == 4) { screen->nextWorkspace(1); -- cgit v0.11.2