diff options
author | marha <marha@users.sourceforge.net> | 2010-07-23 12:54:07 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-07-23 12:54:07 +0000 |
commit | 36df22a9b06d00d8e2ca97c274317d61e117c5fc (patch) | |
tree | 9b1bbb4af88129f5716202096de15665678d91e5 /xorg-server/hw/xwin/winmultiwindowwindow.c | |
parent | 63dbb32737306d4c567a0bcbd7153da77cf864b5 (diff) | |
download | vcxsrv-36df22a9b06d00d8e2ca97c274317d61e117c5fc.tar.gz vcxsrv-36df22a9b06d00d8e2ca97c274317d61e117c5fc.tar.bz2 vcxsrv-36df22a9b06d00d8e2ca97c274317d61e117c5fc.zip |
Fix a GDI bitmap resource leak of window icons
Internal WM workaround for Java AWT bug
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwindow.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index 99f812e49..80cae7636 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -543,6 +543,8 @@ winDestroyWindowsWindow (WindowPtr pWin) MSG msg;
winWindowPriv(pWin);
BOOL oldstate = winInDestroyWindowsWindow;
+ HICON hIcon;
+ HICON hIconSm;
#if CYGMULTIWINDOW_DEBUG
winDebug ("winDestroyWindowsWindow\n");
@@ -554,6 +556,10 @@ winDestroyWindowsWindow (WindowPtr pWin) winInDestroyWindowsWindow = TRUE;
+ /* Store the info we need to destroy after this window is gone */
+ hIcon = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_BIG, 0);
+ hIconSm = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0);
+
SetProp (pWinPriv->hWnd, WIN_WINDOW_PROP, NULL);
/* Destroy the Windows window */
DestroyWindow (pWinPriv->hWnd);
@@ -561,6 +567,10 @@ winDestroyWindowsWindow (WindowPtr pWin) /* Null our handle to the Window so referencing it will cause an error */
pWinPriv->hWnd = NULL;
+ /* Destroy any icons we created for this window */
+ winDestroyIcon(hIcon);
+ winDestroyIcon(hIconSm);
+
/* Process all messages on our queue */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
|