when the app changes its pixmap we need to trigger that correctly

This commit is contained in:
mathias 2005-05-12 19:55:49 +00:00
parent 41462f08d2
commit 59a806799f

View file

@ -354,11 +354,23 @@ void WinButton::update(FbTk::Subject *subj) {
m_icon_pixmap.release(); m_icon_pixmap.release();
m_icon_mask.release(); m_icon_mask.release();
} else { } else {
// no pixmap
if (!((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0)) if (!((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0))
m_icon_pixmap.release(); m_icon_pixmap.release();
// pixmap has changed
if (hints->flags & IconPixmapHint && hints->icon_pixmap != 0 &&
hints->icon_pixmap != m_icon_pixmap.drawable())
m_icon_pixmap.release();
// no pixmap-mask
if (!(hints->flags & IconMaskHint)) if (!(hints->flags & IconMaskHint))
m_icon_mask.release(); m_icon_mask.release();
// pixmap-mask has changed
if (hints->flags & IconMaskHint && hints->icon_mask != m_icon_mask.drawable())
m_icon_mask.release();
} }
XFree(hints); XFree(hints);