aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c10
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))
{