1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-26 16:32:30 +01:00

Fix wIconUpdate logic

This patch changes the logic for choosing the icon, and gets rid of
wIconChangeImage in favor of wIconChangeImageFile.

Old logic:
* On create, load either NET_WM_ICON or the file from disk.
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. WM_HINTS icon_pixmap
  3. Whatever was loaded on creation, unless wIconChangeImage or
	 wIconChangeImageFile was called.
  4. Default icon.

New logic:
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. NET_WM_ICON
  3. WM_HINTS icon_pixmap
  4. Icon file from disk.
  5. Default icon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
Brad Jorsch
2010-10-08 15:08:32 -04:00
committed by Carlos R. Mafra
parent 7aff3b6e44
commit ee1f13da45
4 changed files with 37 additions and 69 deletions

View File

@@ -39,7 +39,7 @@ typedef struct WIcon {
Window icon_win; /* client suplied icon window */
char *file; /* the file with the icon image */
RImage *image;
RImage *file_image; /* the image from the file */
unsigned int tile_type:4;
unsigned int show_title:1;
@@ -63,7 +63,6 @@ void wIconDestroy(WIcon *icon);
void wIconPaint(WIcon *icon);
void wIconUpdate(WIcon *icon);
void wIconChangeTitle(WIcon *icon, char *new_title);
void wIconChangeImage(WIcon *icon, RImage *new_image);
Bool wIconChangeImageFile(WIcon *icon, char *file);
void wIconSelect(WIcon *icon);