aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WinButton.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 36639f5..f97784e 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -354,11 +354,23 @@ void WinButton::update(FbTk::Subject *subj) {
354 m_icon_pixmap.release(); 354 m_icon_pixmap.release();
355 m_icon_mask.release(); 355 m_icon_mask.release();
356 } else { 356 } else {
357
358 // no pixmap
357 if (!((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0)) 359 if (!((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0))
358 m_icon_pixmap.release(); 360 m_icon_pixmap.release();
361
362 // pixmap has changed
363 if (hints->flags & IconPixmapHint && hints->icon_pixmap != 0 &&
364 hints->icon_pixmap != m_icon_pixmap.drawable())
365 m_icon_pixmap.release();
359 366
367 // no pixmap-mask
360 if (!(hints->flags & IconMaskHint)) 368 if (!(hints->flags & IconMaskHint))
361 m_icon_mask.release(); 369 m_icon_mask.release();
370
371 // pixmap-mask has changed
372 if (hints->flags & IconMaskHint && hints->icon_mask != m_icon_mask.drawable())
373 m_icon_mask.release();
362 } 374 }
363 375
364 XFree(hints); 376 XFree(hints);