mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-24 07:02:30 +01:00
New function update_icon_title
The function update_icon_title() updates the icon title. The code comes from the function wIconPaint().
This commit is contained in:
committed by
Carlos R. Mafra
parent
2c0a449f00
commit
ca86f5594d
15
src/icon.c
15
src/icon.c
@@ -734,14 +734,13 @@ RImage *get_rimage_icon_from_wm_hints(WIcon *icon)
|
||||
return image;
|
||||
}
|
||||
|
||||
void wIconPaint(WIcon *icon)
|
||||
/* This function updates in the screen the icon title */
|
||||
static void update_icon_title(WIcon *icon)
|
||||
{
|
||||
WScreen *scr = icon->core->screen_ptr;
|
||||
int x, l, w;
|
||||
char *tmp;
|
||||
|
||||
XClearWindow(dpy, icon->core->window);
|
||||
|
||||
/* draw the icon title */
|
||||
if (icon->show_title && icon->icon_name != NULL) {
|
||||
tmp = ShrinkString(scr->icon_title_font, icon->icon_name, wPreferences.icon_size - 4);
|
||||
@@ -756,6 +755,16 @@ void wIconPaint(WIcon *icon)
|
||||
scr->icon_title_font, x, 1, tmp, l);
|
||||
wfree(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wIconPaint(WIcon *icon)
|
||||
{
|
||||
WScreen *scr = icon->core->screen_ptr;
|
||||
|
||||
XClearWindow(dpy, icon->core->window);
|
||||
|
||||
update_icon_title(icon);
|
||||
|
||||
if (icon->selected)
|
||||
XDrawRectangle(dpy, icon->core->window, scr->icon_select_gc, 0, 0,
|
||||
|
||||
Reference in New Issue
Block a user