summaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 68e5600..0295481 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -29,7 +29,7 @@
29 29
30#include "Xutil.hh" 30#include "Xutil.hh"
31 31
32#include "EventManager.hh" 32#include "FbTk/EventManager.hh"
33#include "FbTk/MultLayers.hh" 33#include "FbTk/MultLayers.hh"
34 34
35#include <iostream> 35#include <iostream>
@@ -358,12 +358,20 @@ void WinClient::updateTitle() {
358 titleSig().notify(); 358 titleSig().notify();
359} 359}
360 360
361void WinClient::setTitle(FbTk::FbString &title) { 361void 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
367void 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
367void WinClient::saveBlackboxAttribs(FluxboxWindow::BlackboxAttributes &blackbox_attribs, int nelements) { 375void 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) {