1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-09 07:14:18 +01:00

get_pixmap_icon_from_wm_hints uses getSize

The function get_pixmap_icon_from_wm_hints() now uses getSize() and
the code dup is removed.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-31 22:44:23 +01:00
committed by Carlos R. Mafra
parent d5e5ae6ca0
commit 0493974cbc

View File

@@ -728,15 +728,14 @@ static void get_pixmap_icon_from_icon_win(WIcon * icon)
/* Get the Pixmap from the XWindow wm_hints */ /* Get the Pixmap from the XWindow wm_hints */
static int get_pixmap_icon_from_wm_hints(WIcon *icon) static int get_pixmap_icon_from_wm_hints(WIcon *icon)
{ {
Window jw;
Pixmap pixmap; Pixmap pixmap;
unsigned int w, h, ju, d; unsigned int w, h, d;
int ji, x, y; int x, y;
WWindow *wwin = icon->owner; WWindow *wwin = icon->owner;
WScreen *scr = icon->core->screen_ptr; WScreen *scr = icon->core->screen_ptr;
int title_height = WMFontHeight(scr->icon_title_font); int title_height = WMFontHeight(scr->icon_title_font);
if (!XGetGeometry(dpy, wwin->wm_hints->icon_pixmap, &jw, &ji, &ji, &w, &h, &ju, &d)) { if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
icon->owner->wm_hints->flags &= ~IconPixmapHint; icon->owner->wm_hints->flags &= ~IconPixmapHint;
return 1; return 1;
} }