all repos — fluxbox @ 44f2af5c10fb2af07ed5577dc9eb5554b7dfb403

custom fork of the fluxbox windowmanager

minor optimization
mathias mathias
commit

44f2af5c10fb2af07ed5577dc9eb5554b7dfb403

parent

f7261680510f069afc7bb8370bc1b0b83f66c1d9

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/WinButton.ccsrc/WinButton.cc

@@ -312,7 +312,7 @@ void WinButton::clear() {

FbTk::Button::clear(); // ensure the m_listen_to has actually a client - if (m_type == MENUICON && m_listen_to.numClients() && ( + if (m_type == MENUICON && !m_listen_to.empty() && ( !m_icon_pixmap.drawable() || (m_icon_pixmap.width() != width() - 4 || m_icon_pixmap.height() != height() - 4))) {

@@ -347,7 +347,7 @@

void WinButton::update(FbTk::Subject *subj) { // just checking, if we the app provides a pixmap. - if (m_type == MENUICON && m_listen_to.numClients()) { + if (m_type == MENUICON && !m_listen_to.empty()) { XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(), m_listen_to.winClient().window()); if (hints == 0) {