mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
Merge branch 'powimod_icon' into 'master'
Load icon from executable on Windows Closes #3713 See merge request GNOME/gtk!3326
This commit is contained in:
commit
fe774c1ad8
@ -352,12 +352,14 @@ RegisterGdkClass (GdkSurfaceType wtype)
|
||||
{
|
||||
char sLoc [MAX_PATH+1];
|
||||
|
||||
if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH))
|
||||
// try to load first icon of executable program
|
||||
if (0 != GetModuleFileName (NULL, sLoc, MAX_PATH))
|
||||
{
|
||||
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
|
||||
|
||||
if (0 == hAppIcon && 0 == hAppIconSm)
|
||||
{
|
||||
// fallback : load icon from GTK DLL
|
||||
if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH))
|
||||
{
|
||||
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user