From f9847da97c46c2c403bcb7e6739da6b875cda8ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Tue, 23 Oct 2012 23:59:53 +0200 Subject: [PATCH] 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. --- src/icon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/icon.c b/src/icon.c index f06f5264..24aff251 100644 --- a/src/icon.c +++ b/src/icon.c @@ -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)) { -- 2.11.4.GIT