minor fix for setCurrentClient and focused label

This commit is contained in:
fluxgen 2003-12-21 16:23:19 +00:00
parent 06cd80c6c8
commit a151145500

View file

@ -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)