diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-16 21:57:21 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-16 21:57:21 +0000 |
| commit | 136c9c078d33e5784881267be03d8ff1adf41bc5 (patch) | |
| tree | 5b9449a318ff53af4ea9fbed8850eb638451288a /src/client.cc | |
| parent | 0c2f0e0b5e974bace6b7488541fac0fed23c5bc9 (diff) | |
support for pixmap icons, kwm_win_icon and the icon in wmhints
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 17 |
1 files changed, 14 insertions, 3 deletions
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; } |
