From a1511455009fa8bdcea655f7d22776189ffc8a37 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Sun, 21 Dec 2003 16:23:19 +0000
Subject: minor fix for setCurrentClient and focused label

---
 src/Window.cc | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/Window.cc b/src/Window.cc
index 4d407ad..c08cd19 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: Window.cc,v 1.255 2003/12/21 15:24:28 rathnor Exp $
+// $Id: Window.cc,v 1.256 2003/12/21 16:23:19 fluxgen Exp $
 
 #include "Window.hh"
 
@@ -902,8 +902,12 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput, long igno
 
     m_client = &client;
     m_client->raise();
-    frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
-    return setinput && setInputFocus(ignore_event);
+    if (setinput && setInputFocus(ignore_event)) {
+        frame().setLabelButtonFocus(*m_labelbuttons[m_client]);
+        return true;
+    }
+
+    return false;
 }
 
 bool FluxboxWindow::isGroupable() const {
@@ -1195,14 +1199,13 @@ bool FluxboxWindow::setInputFocus(long ignore_event) {
     if (m_client->getFocusMode() == WinClient::F_LOCALLYACTIVE ||
         m_client->getFocusMode() == WinClient::F_PASSIVE) {
         m_client->setInputFocus(RevertToPointerRoot, CurrentTime);
-
-        // this may or may not send, but we've setInputFocus already, so return true
         m_client->sendFocus(); 
         ret = true;
     } else {
-        ret = m_client->sendFocus(); // checks if it should send or not
+        ret = m_client->sendFocus(); 
     }
 
+
     // People can ignore an event until the focus comes through
     // this is most likely to be an EnterNotify for sloppy focus
     if (ret && m_client->getFocusMode() != WinClient::F_NOINPUT && ignore_event != None)
-- 
cgit v0.11.2