mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
Make create_appicon_from_dock() do only what its name implies
Function names are important and should not do more than their names imply. In this case, create_appicon_from_dock() should only try to get an icon from the dock (or clip). If the icon is not there, do not try to make an icon from scratch. You were told to create it from the dock! Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
@@ -955,8 +955,6 @@ static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
|
||||
void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window)
|
||||
{
|
||||
WScreen *scr = wwin->screen_ptr;
|
||||
|
||||
/* Create the application icon */
|
||||
wapp->app_icon = NULL;
|
||||
|
||||
if (scr->last_dock)
|
||||
@@ -990,7 +988,5 @@ void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_win
|
||||
|
||||
wAppIconPaint(wapp->app_icon);
|
||||
wAppIconSave(wapp->app_icon);
|
||||
} else {
|
||||
makeAppIconFor(wapp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user