From 136c9c078d33e5784881267be03d8ff1adf41bc5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 16 Feb 2003 21:57:21 +0000 Subject: support for pixmap icons, kwm_win_icon and the icon in wmhints --- src/client.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/client.cc') diff --git a/src/client.cc b/src/client.cc index 7bf72645..53a6d768 100644 --- a/src/client.cc +++ b/src/client.cc @@ -576,6 +576,17 @@ void Client::updateWMHints(bool initstate) } else // no group! _group = None; + if (hints->flags & IconPixmapHint) { + updateKwmIcon(); // try get the kwm icon first, this is a fallback only + if (_pixmap_icon == None) { + _pixmap_icon = hints->icon_pixmap; + if (hints->flags & IconMaskHint) + _pixmap_icon_mask = hints->icon_mask; + else + _pixmap_icon_mask = None; + } + } + XFree(hints); } @@ -758,15 +769,15 @@ void Client::updateIcons() void Client::updateKwmIcon() { - _kwm_icon = _kwm_icon_mask = None; + _pixmap_icon = _pixmap_icon_mask = None; unsigned long num = 2; Pixmap *data; if (otk::Property::get(_window, otk::Property::atoms.kwm_win_icon, otk::Property::atoms.kwm_win_icon, &num, &data)) { if (num >= 2) { - _kwm_icon = data[0]; - _kwm_icon_mask = data[1]; + _pixmap_icon = data[0]; + _pixmap_icon_mask = data[1]; } delete [] data; } -- cgit v1.2.3