changeset 33543:10f9498fada1

Use small icon for property KWM_WIN_ICON, if available. This property will allow the window manager to select from differently sized icons. It is a preparation for this feature to come.
author ib
date Thu, 16 Jun 2011 15:03:18 +0000
parents 107084241b00
children b71fac188432
files gui/mplayer/widgets.h gui/wm/ws.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/mplayer/widgets.h	Thu Jun 16 14:50:24 2011 +0000
+++ b/gui/mplayer/widgets.h	Thu Jun 16 15:03:18 2011 +0000
@@ -55,6 +55,8 @@
 extern char *sbMPlayerPrefixDir;
 
 typedef struct {
+    Pixmap small;
+    Pixmap small_mask;
     Pixmap normal;
     Pixmap normal_mask;
     int collection_size;
--- a/gui/wm/ws.c	Thu Jun 16 14:50:24 2011 +0000
+++ b/gui/wm/ws.c	Thu Jun 16 15:03:18 2011 +0000
@@ -1550,8 +1550,8 @@
     XFree(wm);
 
     iconatom = XInternAtom(dsp, "KWM_WIN_ICON", False);
-    data[0]  = icon->normal;
-    data[1]  = icon->normal_mask;
+    data[0]  = (icon->small ? icon->small : icon->normal);
+    data[1]  = (icon->small ? icon->small_mask : icon->normal_mask);
 
     XChangeProperty(dsp, win, iconatom, iconatom, 32, PropModeReplace, (unsigned char *)data, 2);