fixed multiwin crashing win32k when closing the window with the child window

svn path=/trunk/; revision=6385
This commit is contained in:
Thomas Bluemel 2003-10-20 14:00:58 +00:00
parent 139847baad
commit a5ab15b6e3

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: winpos.c,v 1.33 2003/10/18 17:35:44 navaraf Exp $ /* $Id: winpos.c,v 1.34 2003/10/20 14:00:58 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -1228,19 +1228,27 @@ WinPosSetActiveWindow(PWINDOW_OBJECT Window, BOOL Mouse, BOOL ChangeFocus)
if (PrevActive != NULL) if (PrevActive != NULL)
{ {
PWINDOW_OBJECT PrevActiveWindow = IntGetWindowObject(PrevActive); PWINDOW_OBJECT PrevActiveWindow = IntGetWindowObject(PrevActive);
WORD Iconised = HIWORD(PrevActiveWindow->Style & WS_MINIMIZE); if(PrevActiveWindow)
if (!IntSendMessage(PrevActive, WM_NCACTIVATE, FALSE, 0, TRUE)) {
{ WORD Iconised = HIWORD(PrevActiveWindow->Style & WS_MINIMIZE);
/* FIXME: Check if the new window is system modal. */ if (!IntSendMessage(PrevActive, WM_NCACTIVATE, FALSE, 0, TRUE))
return(FALSE); {
} /* FIXME: Check if the new window is system modal. */
IntSendMessage(PrevActive, return(FALSE);
WM_ACTIVATE, }
MAKEWPARAM(WA_INACTIVE, Iconised), IntSendMessage(PrevActive,
(LPARAM)Window->Self, WM_ACTIVATE,
TRUE); MAKEWPARAM(WA_INACTIVE, Iconised),
/* FIXME: Check if anything changed while processing the message. */ (LPARAM)Window->Self,
IntReleaseWindowObject(PrevActiveWindow); TRUE);
/* FIXME: Check if anything changed while processing the message. */
IntReleaseWindowObject(PrevActiveWindow);
}
else
{
ActiveQueue->ActiveWindow = NULL;
PrevActive = NULL;
}
} }
if (Window != NULL) if (Window != NULL)