X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=3dc6237f1a36e2e6cdfa6ae99fb3ec466fda3977;hb=d2dcef46752df01312cbb3c5a89b3227c6959087;hp=706714423adb4c9b51d259add622eab4920be808;hpb=50002f2ceb4234145f3977bb14752dc930ada26c;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 70671442..3dc6237f 100644 --- a/src/client.cc +++ b/src/client.cc @@ -581,7 +581,7 @@ void Client::updateWMHints(bool initstate) if (ur != _urgent) { _urgent = ur; #ifdef DEBUG - printf("DEBUG: Urgent Hint for 0x%lx: %s\n", + printf("Urgent Hint for 0x%lx: %s\n", (long)_window, _urgent ? "ON" : "OFF"); #endif // fire the urgent callback if we're mapped, otherwise, wait until after @@ -1237,9 +1237,9 @@ const Icon *Client::icon(const otk::Size &s) const li = i; } } - if (smallest == 0xffffffff) // didnt find one bigger than us... - return &_icons[li]; - return &_icons[si]; + if (largest == 0) // didnt find one smaller than the requested size + return &_icons[si]; + return &_icons[li]; } void Client::move(int x, int y) @@ -1717,8 +1717,6 @@ bool Client::focus() // visible on the screen if (!(frame->visible() && (_can_focus || _focus_notify))) return false; - if (_focused) return true; - // do a check to see if the window has already been unmapped or destroyed // do this intelligently while watching out for unmaps we've generated // (ignore_unmaps > 0) @@ -1762,8 +1760,6 @@ bool Client::focus() void Client::unfocus() const { - if (!_focused) return; - assert(openbox->focusedClient() == this); openbox->setFocusedClient(0); }