mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Split get_pixmap_icon_from_user_icon() into two
The function get_pixmap_icon_from_user_icon() is splitted in two functions now: 1. get_rimage_icon_from_user_icon, set the rimage at icon->image The code comes from the function get_pixmap_icon_from_default_icon() 2. The get_pixmap_icon_from_user_icon() function, but now only converts the icon->file_image in icon->pixmap
This commit is contained in:
committed by
Carlos R. Mafra
parent
8349a018f0
commit
c79eaa59b2
17
src/icon.c
17
src/icon.c
@@ -63,6 +63,7 @@ static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y);
|
||||
static void get_pixmap_icon_from_icon_win(WIcon *icon);
|
||||
static int get_pixmap_icon_from_wm_hints(WIcon *icon);
|
||||
static void get_pixmap_icon_from_user_icon(WIcon *icon);
|
||||
static void get_rimage_icon_from_user_icon(WIcon *icon);
|
||||
static void get_pixmap_icon_from_default_icon(WIcon *icon);
|
||||
static void get_rimage_icon_from_default_icon(WIcon *icon);
|
||||
|
||||
@@ -628,15 +629,21 @@ void wIconUpdate(WIcon *icon)
|
||||
wIconPaint(icon);
|
||||
}
|
||||
|
||||
static void get_pixmap_icon_from_user_icon(WIcon *icon)
|
||||
static void get_rimage_icon_from_user_icon(WIcon *icon)
|
||||
{
|
||||
/* If the icon has image, update it and continue */
|
||||
if (icon->file_image) {
|
||||
icon_update_pixmap(icon, icon->file_image);
|
||||
if (icon->file_image)
|
||||
return;
|
||||
|
||||
get_rimage_icon_from_default_icon(icon);
|
||||
}
|
||||
|
||||
get_pixmap_icon_from_default_icon(icon);
|
||||
static void get_pixmap_icon_from_user_icon(WIcon *icon)
|
||||
{
|
||||
/* Set the icon->file_image */
|
||||
get_rimage_icon_from_user_icon(icon);
|
||||
|
||||
/* Update icon->pixmap */
|
||||
icon_update_pixmap(icon, icon->file_image);
|
||||
}
|
||||
|
||||
static void get_rimage_icon_from_default_icon(WIcon *icon)
|
||||
|
||||
Reference in New Issue
Block a user