From 59a806799ffda3ff2bc3bf7a2c0942c5edb8dbfa Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 12 May 2005 19:55:49 +0000 Subject: when the app changes its pixmap we need to trigger that correctly --- src/WinButton.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) { m_icon_pixmap.release(); m_icon_mask.release(); } else { + + // no pixmap if (!((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0)) 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)) 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); -- cgit v0.11.2