aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WinButton.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 1a28e8f..33995b4 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -310,8 +310,9 @@ void WinButton::drawType() {
310 310
311void WinButton::clear() { 311void WinButton::clear() {
312 FbTk::Button::clear(); 312 FbTk::Button::clear();
313 313
314 if (m_type == MENUICON && ( 314 // ensure the m_listen_to has actually a client
315 if (m_type == MENUICON && m_listen_to.numClients() && (
315 !m_icon_pixmap.drawable() || 316 !m_icon_pixmap.drawable() ||
316 (m_icon_pixmap.width() != width() - 4 || 317 (m_icon_pixmap.width() != width() - 4 ||
317 m_icon_pixmap.height() != height() - 4))) { 318 m_icon_pixmap.height() != height() - 4))) {
@@ -339,15 +340,14 @@ void WinButton::clear() {
339 340
340 XFree(hints); 341 XFree(hints);
341 } 342 }
342 343
343 drawType(); 344 drawType();
344} 345}
345 346
346void WinButton::update(FbTk::Subject *subj) { 347void WinButton::update(FbTk::Subject *subj) {
347 348
348
349 // just checking, if we the app provides a pixmap. 349 // just checking, if we the app provides a pixmap.
350 if (m_type == MENUICON) { 350 if (m_type == MENUICON && m_listen_to.numClients()) {
351 XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(), 351 XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(),
352 m_listen_to.winClient().window()); 352 m_listen_to.winClient().window());
353 if (hints == 0) { 353 if (hints == 0) {