aboutsummaryrefslogtreecommitdiff
path: root/src/WinButton.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-17 23:34:01 (GMT)
committersimonb <simonb>2006-04-17 23:34:01 (GMT)
commitb9af026688f0945196582af5773d62f5df3f97f3 (patch)
treed97e66e4271480644f3ff2a2c0106730d1f714f4 /src/WinButton.cc
parent3e6def97d18133baf82b596cb742a2f7ef4f9f00 (diff)
downloadfluxbox_paul-b9af026688f0945196582af5773d62f5df3f97f3.zip
fluxbox_paul-b9af026688f0945196582af5773d62f5df3f97f3.tar.bz2
iconbutton handling fixes
Diffstat (limited to 'src/WinButton.cc')
-rw-r--r--src/WinButton.cc27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 4f50935..496e63d 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -319,26 +319,19 @@ void WinButton::clear() {
319 319
320 Display* display = m_listen_to.fbWindow().display(); 320 Display* display = m_listen_to.fbWindow().display();
321 int screen = m_listen_to.screen().screenNumber(); 321 int screen = m_listen_to.screen().screenNumber();
322 XWMHints* hints = XGetWMHints(display, m_listen_to.winClient().window()); 322 if (m_listen_to.usePixmap()) {
323 if (hints == 0) { 323 m_icon_pixmap.copy(m_listen_to.iconPixmap().drawable(),
324 DefaultDepth(display, screen), screen);
325 m_icon_pixmap.scale(width() - 4, height() - 4);
326 } else
324 m_icon_pixmap.release(); 327 m_icon_pixmap.release();
325 m_icon_mask.release();
326 } else {
327 if ((hints->flags & IconPixmapHint) && hints->icon_pixmap != 0) {
328 m_icon_pixmap.copy(hints->icon_pixmap,
329 DefaultDepth(display, screen), screen);
330 m_icon_pixmap.scale(width() - 4, height() - 4);
331 } else
332 m_icon_pixmap.release();
333 328
334 if ((hints->flags & IconMaskHint)) { 329 if (m_listen_to.useMask()) {
335 m_icon_mask.copy(hints->icon_mask, 0, 0); 330 m_icon_mask.copy(m_listen_to.iconMask().drawable(), 0, 0);
336 m_icon_mask.scale(width() - 4, height() - 4); 331 m_icon_mask.scale(width() - 4, height() - 4);
337 } else 332 } else
338 m_icon_mask.release(); 333 m_icon_mask.release();
339 }
340 334
341 XFree(hints);
342 } 335 }
343 336
344 drawType(); 337 drawType();