all repos — fluxbox @ 64eb8cd6a92f4dfc0caf261b65535b86b3e0f542

custom fork of the fluxbox windowmanager

new code in WinButton was assuming that at ::clear() - time there is always a
valid m_listen_to.winClient() .. which is not true under some circumstance.
i guarded the code accordingly.
mathias mathias
commit

64eb8cd6a92f4dfc0caf261b65535b86b3e0f542

parent

a65511a32e2fc6e8869ccdcf85c9d6db61ae5f5b

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

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

@@ -310,8 +310,9 @@ }

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

@@ -339,15 +340,14 @@ }

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