mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
Check one time if no_appicon is set
This patch checks if the no_appicon flag is set, then, the icon is not created, therefore cannot be painted neither saved. Some comments added to clarify the code.
This commit is contained in:
committed by
Carlos R. Mafra
parent
bd3fb21441
commit
dd6a54bba5
@@ -316,10 +316,12 @@ WApplication *wApplicationCreate(WWindow * wwin)
|
|||||||
/* application descriptor */
|
/* application descriptor */
|
||||||
XSaveContext(dpy, main_window, wAppWinContext, (XPointer) wapp);
|
XSaveContext(dpy, main_window, wAppWinContext, (XPointer) wapp);
|
||||||
|
|
||||||
|
/* Create the application icon */
|
||||||
wapp->app_icon = NULL;
|
wapp->app_icon = NULL;
|
||||||
|
if (!WFLAGP(wapp->main_window_desc, no_appicon)) {
|
||||||
/* Create the application icon using the icon from docks */
|
/* Create the application icon using the icon from docks
|
||||||
if (!WFLAGP(wapp->main_window_desc, no_appicon))
|
* If not found in docks, create a new icon
|
||||||
|
* using the function wAppIconCreate() */
|
||||||
app_icon_create_from_docks(wwin, wapp, main_window);
|
app_icon_create_from_docks(wwin, wapp, main_window);
|
||||||
|
|
||||||
/* Now, paint the icon */
|
/* Now, paint the icon */
|
||||||
@@ -327,6 +329,7 @@ WApplication *wApplicationCreate(WWindow * wwin)
|
|||||||
|
|
||||||
/* Save the app_icon in a file */
|
/* Save the app_icon in a file */
|
||||||
save_app_icon(wwin, wapp);
|
save_app_icon(wwin, wapp);
|
||||||
|
}
|
||||||
|
|
||||||
return wapp;
|
return wapp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user