From: "Rodolfo García Peñas (kix)" <[email protected]>
The function update_icon_title() updates the icon title.
The code comes from the function wIconPaint().
---
src/icon.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index a6bba71..e9e9c89 100644
--- a/src/icon.c
+++ b/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,
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].