diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2010-07-22 18:36:51 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-04-27 14:22:13 +0100 |
commit | bd288c3458bc1ba2cbb4c8416e5b2dfd849581e6 (patch) | |
tree | a0edc2f8460cb240b9fe45996f28649a76f7a728 /hw/xwin/winmultiwindowicons.c | |
parent | 19e764eee0c8b74d877fb2b1d6aedc933976660e (diff) |
Cygwin/X: Fix a GDI bitmap resource leak of window icons
Ensure any icon created specially for a window is destroyed when
the window is destroyed
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winmultiwindowicons.c')
-rw-r--r-- | hw/xwin/winmultiwindowicons.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c index 1ca3f9141..44956e389 100644 --- a/hw/xwin/winmultiwindowicons.c +++ b/hw/xwin/winmultiwindowicons.c @@ -624,6 +624,7 @@ void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon) *pIcon = hIcon; else winDestroyIcon(hIcon); + if (pSmallIcon) *pSmallIcon = hSmallIcon; else @@ -632,7 +633,7 @@ void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon) void winDestroyIcon(HICON hIcon) { - /* Delete the icon if its not the default */ + /* Delete the icon if its not one of the application defaults or an override */ if (hIcon && hIcon != g_hIconX && hIcon != g_hSmallIconX && |