1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

get_pixmap_icon_from_wm_hints removed extra arguments

The function get_pixmap_icon_from_wm_hints has two extra arguments
(WScreen and WWindow) not needed, because these arguments can be
accessed using the argument WIcon.

This function removes them in the function definition and provides
them in the function code.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-23 23:59:53 +02:00
committed by Carlos R. Mafra
parent 362915a7b3
commit f9847da97c

View File

@@ -61,7 +61,7 @@ static void miniwindowDblClick(WObjDescriptor * desc, XEvent * event);
static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y);
void get_pixmap_icon_from_icon_win(WIcon *icon);
int get_pixmap_icon_from_wm_hints(WScreen *scr, WWindow *wwin, WIcon *icon);
int get_pixmap_icon_from_wm_hints(WIcon *icon);
void get_pixmap_icon_from_user_icon(WIcon *icon);
/****** Notification Observers ******/
@@ -594,7 +594,7 @@ void wIconUpdate(WIcon *icon)
icon->shadowed, icon->tile_type, icon->highlighted);
} else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) {
/* Get the Pixmap from the wm_hints, else, from the user */
if (get_pixmap_icon_from_wm_hints(scr, wwin, icon))
if (get_pixmap_icon_from_wm_hints(icon))
get_pixmap_icon_from_user_icon(icon);
} else {
/* Get the Pixmap from the user */
@@ -711,12 +711,14 @@ void get_pixmap_icon_from_icon_win(WIcon * icon)
}
/* Get the Pixmap from the XWindow wm_hints */
int get_pixmap_icon_from_wm_hints(WScreen *scr, WWindow *wwin, WIcon *icon)
int get_pixmap_icon_from_wm_hints(WIcon *icon)
{
Window jw;
Pixmap pixmap;
unsigned int w, h, ju, d;
int ji, x, y;
WWindow *wwin = icon->owner;
WScreen *scr = icon->core->screen_ptr;
int title_height = WMFontHeight(scr->icon_title_font);
if (!XGetGeometry(dpy, wwin->wm_hints->icon_pixmap, &jw, &ji, &ji, &w, &h, &ju, &d)) {