From 606c64b199e403a47f0ab55a59821335c515639d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Mon, 17 Oct 2005 21:57:02 +0000 Subject: [PATCH] Everything must come to an end, even the desktop window. Fixes bug 805. svn path=/trunk/; revision=18534 --- reactos/subsys/win32k/ntuser/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index b99e0a8df2f..48008166a0e 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -2035,7 +2035,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window) ASSERT_REFS_CO(Window); //fixme: temp hack? /* Check for owner thread and desktop window */ - if ((Window->OwnerThread != PsGetCurrentThread()) || IntIsDesktopWindow(Window)) + if ((Window->OwnerThread != PsGetCurrentThread())) { SetLastWin32Error(ERROR_ACCESS_DENIED); return FALSE; @@ -2103,7 +2103,8 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window) HWND *ChildHandle; PWINDOW_OBJECT Child, Desktop; - Desktop = UserGetWindowObject(IntGetDesktopWindow()); + Desktop = IntIsDesktopWindow(Window) ? Window : + UserGetWindowObject(IntGetDesktopWindow()); Children = IntWinListChildren(Desktop); if (Children)