summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-02-02 15:08:39 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-02-02 15:08:39 +0800
commit497411d3b0f67adfc788692e69684d7be11e1a41 (patch)
tree8945531cf4b2f4094c0306e4a464bb734ce7a1ad /src/window.cpp
parent1e1c7131e29ddeea3daf388f5d715b8effdfef77 (diff)
downloadunity-window-decorator-497411d3b0f67adfc788692e69684d7be11e1a41.tar.gz
unity-window-decorator-497411d3b0f67adfc788692e69684d7be11e1a41.tar.bz2
Fix icon property reading if the icon pixmap has a depth of 1 bit.
Forward port of 4c7ffc4f1d82414a466fa0768d16fa96f30e3f7a to master
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index dbc8fb9..86e6f33 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3890,6 +3890,8 @@ PrivateWindow::readIconHint ()
{
if (maskImage && !XGetPixel (maskImage, i, j))
*p++ = 0;
+ else if (image->depth == 1) /* white : black */
+ *p++ = colors[k].pixel ? 0xffffffff : 0xff000000;
else
*p++ = 0xff000000 | /* alpha */
(((colors[k].red >> 8) & 0xff) << 16) | /* red */