mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
Fixes missing appicons after restarting Window Maker
Fixes the bug where if the icon image is accidentally set to
nothing or the image file is deleted, the appicon keeps losing
its icon (it resets to the default cube icon) when Window Maker
exits/restarts (depending on how the user cleared the icon this
may persist even after redocking the application if information
about the application window is still in the WM). One way to
easily see this bug is to open the main window's attributes and
press the Save button (no need to do anything else) as this
clears the icon file (this is a separate bug that needs to be
fixed but it is more of a minor UI bug since clearing the image
should simply reset the icon to the application provided one if
the Ignore client supplied icon is not set). Another way to
see it is to open the properties box in a docked application
that is not running and clear the image field. After either of
these two actions are performed, restart Window Maker and see
that the icons are missing.
This patch fixes the above bug by calling save_appicon when the
appicon object is created and the application provided icon is
already available (window maker actually tries to save the icon
at an earlier stage but this is done as a side effect of
"painting" the dock icon - which also saves the icon - but this
is done too early, before ownership information is available).
Note that this bug seems to be a regression introduced from
commit 9c4b19d8aa (or one of the
related commits around the same time, they seem to be a bit too
aggressive in not saving icons). This patch addresses the
concern in that commit about only saving the icon for docked
applications.
This commit is contained in:
committed by
Carlos R. Mafra
parent
569fbff07c
commit
c89ec25c80
@@ -159,6 +159,13 @@ void create_appicon_for_application(WApplication *wapp, WWindow *wwin)
|
||||
if (!WFLAGP(wapp->main_window_desc, no_appicon))
|
||||
paint_app_icon(wapp);
|
||||
}
|
||||
|
||||
/* At this point the application is fully set up and all icon and
|
||||
* window data are known - so try to save the icon file for docked
|
||||
* applications to ensure that the file exists when window maker
|
||||
* starts up next time. */
|
||||
if (wapp->app_icon->docked && !WFLAGP(wapp->main_window_desc, no_appicon))
|
||||
save_appicon(wapp->app_icon);
|
||||
}
|
||||
|
||||
void unpaint_app_icon(WApplication *wapp)
|
||||
|
||||
Reference in New Issue
Block a user