diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-02-24 20:58:24 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-02-24 20:58:24 (GMT) |
commit | 46fdf4d1b4043588b057fcc9a03f5f66b6b09354 (patch) | |
tree | ce3e8f83a78d0909077e8c79dd45c50d23a65b45 /src/WinClient.cc | |
parent | 611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2 (diff) | |
download | fluxbox_pavel-46fdf4d1b4043588b057fcc9a03f5f66b6b09354.zip fluxbox_pavel-46fdf4d1b4043588b057fcc9a03f5f66b6b09354.tar.bz2 |
use _NET_WM_ICON property as resource for icons, fixed partly #1852693
instead of depending on proper icons in the old icccm wmhints, fluxbox now
tries to get the icon data stored in _NET_WM_ICON
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r-- | src/WinClient.cc | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc index b6df606..0295481 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc | |||
@@ -358,12 +358,20 @@ void WinClient::updateTitle() { | |||
358 | titleSig().notify(); | 358 | titleSig().notify(); |
359 | } | 359 | } |
360 | 360 | ||
361 | void WinClient::setTitle(FbTk::FbString &title) { | 361 | void WinClient::setTitle(const FbTk::FbString &title) { |
362 | m_title = title; | 362 | m_title = title; |
363 | m_title_override = true; | 363 | m_title_override = true; |
364 | titleSig().notify(); | 364 | titleSig().notify(); |
365 | } | 365 | } |
366 | 366 | ||
367 | void WinClient::setIcon(const FbTk::PixmapWithMask& pm) { | ||
368 | |||
369 | m_icon.pixmap().copy(pm.pixmap()); | ||
370 | m_icon.mask().copy(pm.mask()); | ||
371 | m_icon_override = true; | ||
372 | titleSig().notify(); | ||
373 | } | ||
374 | |||
367 | void WinClient::saveBlackboxAttribs(FluxboxWindow::BlackboxAttributes &blackbox_attribs, int nelements) { | 375 | void WinClient::saveBlackboxAttribs(FluxboxWindow::BlackboxAttributes &blackbox_attribs, int nelements) { |
368 | changeProperty(FbAtoms::instance()->getFluxboxAttributesAtom(), | 376 | changeProperty(FbAtoms::instance()->getFluxboxAttributesAtom(), |
369 | XA_CARDINAL, 32, PropModeReplace, | 377 | XA_CARDINAL, 32, PropModeReplace, |
@@ -429,15 +437,18 @@ void WinClient::updateWMHints() { | |||
429 | if (wmhint->flags & WindowGroupHint && !window_group) | 437 | if (wmhint->flags & WindowGroupHint && !window_group) |
430 | window_group = wmhint->window_group; | 438 | window_group = wmhint->window_group; |
431 | 439 | ||
432 | if ((bool)(wmhint->flags & IconPixmapHint) && wmhint->icon_pixmap != 0) | 440 | if (! m_icon_override) { |
433 | m_icon.pixmap().copy(wmhint->icon_pixmap, 0, 0); | ||
434 | else | ||
435 | m_icon.pixmap().release(); | ||
436 | 441 | ||
437 | if ((bool)(wmhint->flags & IconMaskHint) && wmhint->icon_mask != 0) | 442 | if ((bool)(wmhint->flags & IconPixmapHint) && wmhint->icon_pixmap != 0) |
438 | m_icon.mask().copy(wmhint->icon_mask, 0, 0); | 443 | m_icon.pixmap().copy(wmhint->icon_pixmap, 0, 0); |
439 | else | 444 | else |
440 | m_icon.mask().release(); | 445 | m_icon.pixmap().release(); |
446 | |||
447 | if ((bool)(wmhint->flags & IconMaskHint) && wmhint->icon_mask != 0) | ||
448 | m_icon.mask().copy(wmhint->icon_mask, 0, 0); | ||
449 | else | ||
450 | m_icon.mask().release(); | ||
451 | } | ||
441 | 452 | ||
442 | if (fbwindow()) { | 453 | if (fbwindow()) { |
443 | if (wmhint->flags & XUrgencyHint) { | 454 | if (wmhint->flags & XUrgencyHint) { |