diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-05-19 21:03:58 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-05-19 21:03:58 +0000 |
commit | 651822270cedfd8a96ebde742a51248db3e44e38 (patch) | |
tree | 5882a3f90b289f23a49c84bf4a293104083df597 /hw | |
parent | c3dd97f5caa1f3e9093e8c28eebe8803f7cdc061 (diff) |
Support small icons for winOverrideDefaultIcon too.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwin/ChangeLog | 7 | ||||
-rwxr-xr-x | hw/xwin/winmultiwindowicons.c | 6 | ||||
-rw-r--r-- | hw/xwin/winprefs.c | 4 | ||||
-rw-r--r-- | hw/xwin/winprefs.h | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog index 3ec1fb319..9abc7161d 100644 --- a/hw/xwin/ChangeLog +++ b/hw/xwin/ChangeLog @@ -1,4 +1,11 @@ 2004-05-19 Alexander Gottwald <ago@freedesktop.org> + + * winmultiwindowicons.c (winInitGlobalIcons): Load the small default + icon too + * winprefs.h, winprefs.c (winOverrideDefaultIcon): Takes the iconsize + as parameter + +2004-05-19 Alexander Gottwald <ago@freedesktop.org> * win.h, winmultiwindowicons.c (winXIconToHICON): Takes iconsize as parameter diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c index 9865f0e58..34151a46c 100755 --- a/hw/xwin/winmultiwindowicons.c +++ b/hw/xwin/winmultiwindowicons.c @@ -403,11 +403,13 @@ winUpdateIcon (Window id) void winInitGlobalIcons (void) { + int sm_cx = GetSystemMetrics(SM_CXICON); + int sm_cxsm = GetSystemMetrics(SM_CXSMICON); /* Load default X icon in case it's not ready yet */ if (!g_hIconX) { - g_hIconX = (HICON)winOverrideDefaultIcon(); - g_hSmallIconX = NULL; + g_hIconX = (HICON)winOverrideDefaultIcon(sm_cx); + g_hSmallIconX = (HICON)winOverrideDefaultIcon(sm_cxsm); } if (!g_hIconX) diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index 83adf173e..ea36dd9b8 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -497,13 +497,13 @@ SetupRootMenu (unsigned long hmenuRoot) * Check for and return an overridden default ICON specified in the prefs */ unsigned long -winOverrideDefaultIcon() +winOverrideDefaultIcon(int size) { HICON hicon; if (pref.defaultIconName[0]) { - hicon = LoadImageComma (pref.defaultIconName, 0, 0, LR_DEFAULTSIZE); + hicon = LoadImageComma (pref.defaultIconName, size, size, 0); if (hicon==NULL) ErrorF ("winOverrideDefaultIcon: LoadImageComma(%s) failed\n", pref.defaultIconName); diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h index ef9c412c6..eb8867907 100644 --- a/hw/xwin/winprefs.h +++ b/hw/xwin/winprefs.h @@ -157,5 +157,5 @@ unsigned long winTaskbarIcon(void); unsigned long -winOverrideDefaultIcon(void); +winOverrideDefaultIcon(int size); #endif |