diff --git a/src/appicon.c b/src/appicon.c index ce910dd5..2be3eab0 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -67,6 +67,7 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event); static void iconDblClick(WObjDescriptor * desc, XEvent * event); static void iconExpose(WObjDescriptor * desc, XEvent * event); static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char *wm_class); +static WAppIcon *wAppIconCreate(WWindow * leader_win); /* This function is used if the application is a .app. It checks if it has an icon in it * like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff @@ -161,13 +162,12 @@ void makeAppIconFor(WApplication * wapp) if (wapp->app_icon) return; - if (!WFLAGP(wapp->main_window_desc, no_appicon)) - wapp->app_icon = wAppIconCreate(wapp->main_window_desc); - else - wapp->app_icon = NULL; + /* Create the icon */ + wapp->app_icon = wAppIconCreate(wapp->main_window_desc); /* Now, paint the icon */ - paint_app_icon(wapp); + if (!WFLAGP(wapp->main_window_desc, no_appicon)) + paint_app_icon(wapp); } void paint_app_icon(WApplication *wapp) @@ -236,7 +236,7 @@ void removeAppIconFor(WApplication * wapp) wArrangeIcons(wapp->main_window_desc->screen_ptr, True); } -WAppIcon *wAppIconCreate(WWindow * leader_win) +static WAppIcon *wAppIconCreate(WWindow * leader_win) { WAppIcon *aicon; WScreen *scr = leader_win->screen_ptr; @@ -991,6 +991,6 @@ void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp, Window main_w wAppIconPaint(wapp->app_icon); wAppIconSave(wapp->app_icon); } else { - wapp->app_icon = wAppIconCreate(wapp->main_window_desc); + makeAppIconFor(wapp); } } diff --git a/src/appicon.h b/src/appicon.h index e401696d..421ba473 100644 --- a/src/appicon.h +++ b/src/appicon.h @@ -69,7 +69,6 @@ typedef struct WAppIcon { unsigned int lock:1; /* do not allow to be destroyed */ } WAppIcon; -WAppIcon *wAppIconCreate(WWindow *leader_win); WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance, char *wm_class, int tile); diff --git a/src/application.c b/src/application.c index 43803c28..33ee7bab 100644 --- a/src/application.c +++ b/src/application.c @@ -151,10 +151,6 @@ WApplication *wApplicationCreate(WWindow * wwin) /* Save the app_icon in a file */ save_app_icon(wapp); - /* Now, paint the icon */ - if (!WFLAGP(wapp->main_window_desc, no_appicon)) - paint_app_icon(wapp); - return wapp; }