1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00

Create WAppIcon always

When the application is created, the WAppIcon now is created always,
but it is only painted if the flag is not set.

The icon initialization to NULL can be done now at app_icon_create_from_docks
because it is always called.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-06-18 11:15:19 +02:00
committed by Carlos R. Mafra
parent a08adcd283
commit bc0700e016
2 changed files with 12 additions and 12 deletions

View File

@@ -975,6 +975,9 @@ void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp, Window main_w
{
WScreen *scr = wwin->screen_ptr;
/* Create the application icon */
wapp->app_icon = NULL;
if (scr->last_dock)
wapp->app_icon = findDockIconFor(scr->last_dock, main_window);

View File

@@ -158,20 +158,17 @@ WApplication *wApplicationCreate(WWindow * wwin)
/* application descriptor */
XSaveContext(dpy, main_window, wAppWinContext, (XPointer) wapp);
/* Create the application icon */
wapp->app_icon = NULL;
if (!WFLAGP(wapp->main_window_desc, no_appicon)) {
/* Create the application icon using the icon from docks
* If not found in docks, create a new icon
* using the function wAppIconCreate() */
app_icon_create_from_docks(wwin, wapp, main_window);
/* Now, paint the icon */
paint_app_icon(wapp);
/* Save the app_icon in a file */
save_app_icon(wwin, wapp);
}
/* Now, paint the icon */
if (!WFLAGP(wapp->main_window_desc, no_appicon))
paint_app_icon(wapp);
return wapp;
}