diff --git a/reactos/win32ss/user/ntuser/desktop.c b/reactos/win32ss/user/ntuser/desktop.c index 446e2957b88..368f12e9dab 100644 --- a/reactos/win32ss/user/ntuser/desktop.c +++ b/reactos/win32ss/user/ntuser/desktop.c @@ -1806,7 +1806,7 @@ NtUserOpenDesktop( { ERR("Failed to open desktop\n"); SetLastNtError(Status); - return 0; + return NULL; } TRACE("Opened desktop %S with handle 0x%p\n", ObjectAttributes->ObjectName->Buffer, Desktop); diff --git a/reactos/win32ss/user/ntuser/desktop.h b/reactos/win32ss/user/ntuser/desktop.h index 7f3e1ac3092..b615e3675cf 100644 --- a/reactos/win32ss/user/ntuser/desktop.h +++ b/reactos/win32ss/user/ntuser/desktop.h @@ -181,11 +181,36 @@ VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam); HDC FASTCALL UserGetDesktopDC(ULONG,BOOL,BOOL); #define IntIsActiveDesktop(Desktop) \ - ((Desktop)->rpwinstaParent->ActiveDesktop == (Desktop)) + ((Desktop)->rpwinstaParent->ActiveDesktop == (Desktop)) HWND FASTCALL IntGetMessageWindow(VOID); PWND FASTCALL UserGetMessageWindow(VOID); +#if 0 +static __inline BOOL +UserIsDesktopWindow(IN PWND pWnd) +{ + // return (pWnd == UserGetDesktopWindow()); + return (pWnd && (pWnd->fnid == FNID_DESKTOP)); +} + +static __inline BOOL +UserIsMessageWindow(IN PWND pWnd) +{ + // return (pWnd == UserGetMessageWindow()); + return (pWnd && (pWnd->fnid == FNID_MESSAGEWND)); +} +#else + +#define UserIsDesktopWindow(pWnd) \ + ((pWnd) && ((pWnd)->fnid == FNID_DESKTOP)) + +#define UserIsMessageWindow(pWnd) \ + ((pWnd) && ((pWnd)->fnid == FNID_MESSAGEWND)) + +#endif + + static __inline PVOID DesktopHeapAlloc(IN PDESKTOP Desktop, IN SIZE_T Bytes) diff --git a/reactos/win32ss/user/ntuser/message.c b/reactos/win32ss/user/ntuser/message.c index 9ef84679602..61835863fd9 100644 --- a/reactos/win32ss/user/ntuser/message.c +++ b/reactos/win32ss/user/ntuser/message.c @@ -616,9 +616,7 @@ static LRESULT handle_internal_message( PWND pWnd, UINT msg, WPARAM wparam, LPAR // USER_REFERENCE_ENTRY Ref; // PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - if (!pWnd || - pWnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - pWnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd)) return 0; TRACE("Internal Event Msg 0x%x hWnd 0x%p\n", msg, pWnd->head.h); diff --git a/reactos/win32ss/user/ntuser/nonclient.c b/reactos/win32ss/user/ntuser/nonclient.c index 3ce9cff5a6e..1f422714487 100644 --- a/reactos/win32ss/user/ntuser/nonclient.c +++ b/reactos/win32ss/user/ntuser/nonclient.c @@ -1501,7 +1501,7 @@ NC_HandleNCLButtonDown(PWND pWnd, WPARAM wParam, LPARAM lParam) if ((TopWnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD) break; parent = UserGetAncestor( TopWnd, GA_PARENT ); - if (!parent || parent == UserGetDesktopWindow()) break; + if (!parent || UserIsDesktopWindow(parent)) break; TopWnd = parent; } @@ -1885,7 +1885,7 @@ GetNCHitEx(PWND pWnd, POINT pt) if (!pWnd) return HTNOWHERE; - if (pWnd == UserGetDesktopWindow()) // pWnd->fnid == FNID_DESKTOP) + if (UserIsDesktopWindow(pWnd)) { rcClient.left = rcClient.top = rcWindow.left = rcWindow.top = 0; rcWindow.right = UserGetSystemMetrics(SM_CXSCREEN); diff --git a/reactos/win32ss/user/ntuser/painting.c b/reactos/win32ss/user/ntuser/painting.c index b6db6716005..49528e555bb 100644 --- a/reactos/win32ss/user/ntuser/painting.c +++ b/reactos/win32ss/user/ntuser/painting.c @@ -175,7 +175,7 @@ IntSendSyncPaint(PWND Wnd, ULONG Flags) } // Send to all the children if this is the desktop window. - if ( Wnd == UserGetDesktopWindow() ) + if (UserIsDesktopWindow(Wnd)) { if ( Flags & RDW_ALLCHILDREN || ( !(Flags & RDW_NOCHILDREN) && Wnd->style & WS_CLIPCHILDREN)) @@ -567,9 +567,9 @@ co_IntUpdateWindows(PWND Wnd, ULONG Flags, BOOL Recurse) * Update child windows. */ - if (!(Flags & RDW_NOCHILDREN) && - Flags & RDW_ALLCHILDREN && - Wnd != UserGetDesktopWindow() ) + if (!(Flags & RDW_NOCHILDREN) && + (Flags & RDW_ALLCHILDREN) && + !UserIsDesktopWindow(Wnd)) { PWND Child; @@ -1239,7 +1239,7 @@ IntGetPaintMessage( PaintWnd->state &= ~WNDS_UPDATEDIRTY; Window = PaintWnd; - while( Window && Window != UserGetDesktopWindow()) + while (Window && !UserIsDesktopWindow(Window)) { // Role back and check for clip children, do not set if any. if (Window->spwndParent && !(Window->spwndParent->style & WS_CLIPCHILDREN)) @@ -1578,7 +1578,7 @@ IntFillWindow(PWND pWndParent, POINT ppt; INT x = 0, y = 0; - if ( pWndParent != UserGetDesktopWindow()) + if (!UserIsDesktopWindow(pWndParent)) { x = pWndParent->rcClient.left - pWnd->rcClient.left; y = pWndParent->rcClient.top - pWnd->rcClient.top; @@ -1825,7 +1825,7 @@ co_UserGetUpdateRgn(PWND Window, HRGN hRgn, BOOL bErase) RegionType = SIMPLEREGION; - if (Window != UserGetDesktopWindow()) // Window->fnid == FNID_DESKTOP + if (!UserIsDesktopWindow(Window)) { RECTL_vOffsetRect(&Rect, -Window->rcClient.left, @@ -1846,7 +1846,7 @@ co_UserGetUpdateRgn(PWND Window, HRGN hRgn, BOOL bErase) return RegionType; } - if (Window != UserGetDesktopWindow()) // Window->fnid == FNID_DESKTOP + if (!UserIsDesktopWindow(Window)) { NtGdiOffsetRgn(hRgn, -Window->rcClient.left, @@ -1896,7 +1896,7 @@ co_UserGetUpdateRect(PWND Window, PRECT pRect, BOOL bErase) if (IntIntersectWithParents(Window, pRect)) { - if (Window != UserGetDesktopWindow()) // Window->fnid == FNID_DESKTOP + if (!UserIsDesktopWindow(Window)) { RECTL_vOffsetRect(pRect, -Window->rcClient.left, @@ -2593,9 +2593,8 @@ NtUserPrintWindow( if (hwnd) { - if (!(Window = UserGetWindowObject(hwnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hwnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { goto Exit; } diff --git a/reactos/win32ss/user/ntuser/scrollbar.c b/reactos/win32ss/user/ntuser/scrollbar.c index 041fea485e1..78d48209506 100644 --- a/reactos/win32ss/user/ntuser/scrollbar.c +++ b/reactos/win32ss/user/ntuser/scrollbar.c @@ -1161,9 +1161,8 @@ NtUserEnableScrollBar( TRACE("Enter NtUserEnableScrollBar\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { RETURN(FALSE); } @@ -1247,9 +1246,8 @@ NtUserSetScrollInfo( TRACE("Enter NtUserSetScrollInfo\n"); UserEnterExclusive(); - if(!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if(!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { RETURN( 0); } diff --git a/reactos/win32ss/user/ntuser/scrollex.c b/reactos/win32ss/user/ntuser/scrollex.c index 05a79ae6b2a..dd3b1d47f06 100644 --- a/reactos/win32ss/user/ntuser/scrollex.c +++ b/reactos/win32ss/user/ntuser/scrollex.c @@ -392,7 +392,7 @@ IntScrollWindowEx( { UserRefObjectCo(Child, &WndRef); - if (Window->spwndParent == UserGetDesktopWindow()) // Window->spwndParent->fnid == FNID_DESKTOP ) + if (UserIsDesktopWindow(Window->spwndParent)) lParam = MAKELONG(Child->rcClient.left, Child->rcClient.top); else lParam = MAKELONG(rcChild.left + dx, rcChild.top + dy); diff --git a/reactos/win32ss/user/ntuser/window.c b/reactos/win32ss/user/ntuser/window.c index 861b26625cf..8cf01f9c008 100644 --- a/reactos/win32ss/user/ntuser/window.c +++ b/reactos/win32ss/user/ntuser/window.c @@ -1125,8 +1125,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent) /* Link the window with its new siblings */ IntLinkHwnd( Wnd, ((0 == (Wnd->ExStyle & WS_EX_TOPMOST) && - WndNewParent == UserGetDesktopWindow() ) ? HWND_TOP : HWND_TOPMOST ) ); - + UserIsDesktopWindow(WndNewParent) ) ? HWND_TOP : HWND_TOPMOST ) ); } if ( WndNewParent == co_GetDesktopWindow(Wnd) && @@ -1158,7 +1157,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent) } } - if (WndOldParent == UserGetMessageWindow() || WndNewParent == UserGetMessageWindow()) + if (UserIsMessageWindow(WndOldParent) || UserIsMessageWindow(WndNewParent)) swFlags |= SWP_NOACTIVATE; IntNotifyWinEvent(EVENT_OBJECT_PARENTCHANGE, Wnd ,OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); @@ -1437,7 +1436,7 @@ static void IntSendParentNotify( PWND pWindow, UINT msg ) if ( (pWindow->style & (WS_CHILD | WS_POPUP)) == WS_CHILD && !(pWindow->ExStyle & WS_EX_NOPARENTNOTIFY)) { - if (VerifyWnd(pWindow->spwndParent) && pWindow->spwndParent != UserGetDesktopWindow()) + if (VerifyWnd(pWindow->spwndParent) && !UserIsDesktopWindow(pWindow->spwndParent)) { USER_REFERENCE_ENTRY Ref; UserRefObjectCo(pWindow->spwndParent, &Ref); @@ -2252,7 +2251,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs, IntSendParentNotify(Window, WM_CREATE); /* Notify the shell that a new window was created */ - if (Window->spwndParent == UserGetDesktopWindow() && + if (UserIsDesktopWindow(Window->spwndParent) && Window->spwndOwner == NULL && (Window->style & WS_VISIBLE) && (!(Window->ExStyle & WS_EX_TOOLWINDOW) || @@ -3452,7 +3451,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView) RETURN(FALSE); } - if(!(WndListView = UserGetWindowObject(hwndListView))) + if (!(WndListView = UserGetWindowObject(hwndListView))) { RETURN(FALSE); } @@ -3623,7 +3622,7 @@ co_IntSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi, BOOL bAlte co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_STYLE, (LPARAM) &Style); /* WS_CLIPSIBLINGS can't be reset on top-level windows */ - if (Window->spwndParent == UserGetDesktopWindow()) Style.styleNew |= WS_CLIPSIBLINGS; + if (UserIsDesktopWindow(Window->spwndParent)) Style.styleNew |= WS_CLIPSIBLINGS; /* WS_MINIMIZE can't be reset */ if (OldValue & WS_MINIMIZE) Style.styleNew |= WS_MINIMIZE; /* Fixes wine FIXME: changing WS_DLGFRAME | WS_THICKFRAME is supposed to change WS_EX_WINDOWEDGE too */ diff --git a/reactos/win32ss/user/ntuser/winpos.c b/reactos/win32ss/user/ntuser/winpos.c index 45a3c5c2e20..845d46cf8ba 100644 --- a/reactos/win32ss/user/ntuser/winpos.c +++ b/reactos/win32ss/user/ntuser/winpos.c @@ -99,7 +99,7 @@ IntGetClientRect(PWND Wnd, RECTL *Rect) Rect->bottom = UserGetSystemMetrics(SM_CYMINIMIZED); return; } - if ( Wnd != UserGetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) + if (!UserIsDesktopWindow(Wnd)) { *Rect = Wnd->rcClient; RECTL_vOffsetRect(Rect, -Wnd->rcClient.left, -Wnd->rcClient.top); @@ -122,7 +122,7 @@ IntGetWindowRect(PWND Wnd, RECTL *Rect) ASSERT( Wnd ); ASSERT( Rect ); if (!Wnd) return FALSE; - if ( Wnd != UserGetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) + if (!UserIsDesktopWindow(Wnd)) { *Rect = Wnd->rcWindow; } @@ -151,7 +151,7 @@ IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints) Delta.x = Delta.y = 0; mirror_from = mirror_to = FALSE; - if (FromWnd && FromWnd != UserGetDesktopWindow()) // FromWnd->fnid != FNID_DESKTOP) + if (FromWnd && !UserIsDesktopWindow(FromWnd)) { if (FromWnd->ExStyle & WS_EX_LAYOUTRTL) { @@ -164,7 +164,7 @@ IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints) Delta.y = FromWnd->rcClient.top; } - if (ToWnd && ToWnd != UserGetDesktopWindow()) // ToWnd->fnid != FNID_DESKTOP) + if (ToWnd && !UserIsDesktopWindow(ToWnd)) { if (ToWnd->ExStyle & WS_EX_LAYOUTRTL) { @@ -255,7 +255,7 @@ PWND FASTCALL IntGetLastTopMostWindow(VOID) } VOID -SelectWindowRgn( PWND Window, HRGN hRgnClip) +SelectWindowRgn(PWND Window, HRGN hRgnClip) { if (Window->hrgnClip) { @@ -267,7 +267,7 @@ SelectWindowRgn( PWND Window, HRGN hRgnClip) if (hRgnClip > HRGN_WINDOW) { - /*if (Window != UserGetDesktopWindow()) // Window->fnid != FNID_DESKTOP) + /*if (!UserIsDesktopWindow(Window)) { NtGdiOffsetRgn(hRgnClip, Window->rcWindow.left, Window->rcWindow.top); }*/ @@ -480,7 +480,7 @@ WinPosInitInternalPos(PWND Wnd, RECTL *RestoreRect) POINT Size; RECTL Rect = *RestoreRect; - if (Wnd->spwndParent && Wnd->spwndParent != UserGetDesktopWindow()) + if (Wnd->spwndParent && !UserIsDesktopWindow(Wnd->spwndParent)) { RECTL_vOffsetRect(&Rect, -Wnd->spwndParent->rcClient.left, @@ -782,7 +782,7 @@ WinPosFindIconPos(PWND Window, POINT *Pos) int x, y, xspacing, yspacing; pwndParent = Window->spwndParent; - if (pwndParent == UserGetDesktopWindow()) + if (UserIsDesktopWindow(pwndParent)) { ERR("FIXME: Parent is Desktop, Min off screen!\n"); /* FIXME: ReactOS doesn't support iconic minimize to desktop */ @@ -1972,7 +1972,7 @@ co_WinPosSetWindowPos( 0, RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN); - if (Window->spwndParent == UserGetDesktopWindow()) + if (UserIsDesktopWindow(Window->spwndParent)) co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)Window->head.h, 0); Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE ); @@ -1981,7 +1981,7 @@ co_WinPosSetWindowPos( } else if (WinPos.flags & SWP_SHOWWINDOW) { - if (Window->spwndParent == UserGetDesktopWindow() && + if (UserIsDesktopWindow(Window->spwndParent) && Window->spwndOwner == NULL && (!(Window->ExStyle & WS_EX_TOOLWINDOW) || (Window->ExStyle & WS_EX_APPWINDOW))) @@ -2330,7 +2330,7 @@ co_WinPosSendSizeMove(PWND Wnd) co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SIZE, wParam, lParam); - if (Wnd->spwndParent == UserGetDesktopWindow()) // Wnd->spwndParent->fnid == FNID_DESKTOP ) + if (UserIsDesktopWindow(Wnd->spwndParent)) lParam = MAKELONG(Wnd->rcClient.left, Wnd->rcClient.top); else lParam = MAKELONG(Wnd->rcClient.left-Wnd->spwndParent->rcClient.left, Wnd->rcClient.top-Wnd->spwndParent->rcClient.top); @@ -2582,7 +2582,7 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd) { if ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) { - if ( Wnd->spwndParent == UserGetDesktopWindow()) + if (UserIsDesktopWindow(Wnd->spwndParent)) { if (!ActivateOtherWindowMin(Wnd)) { @@ -2599,7 +2599,8 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd) if (Wnd == pti->MessageQueue->spwndFocus) { Parent = Wnd->spwndParent; - if (Wnd->spwndParent == UserGetDesktopWindow()) Parent = 0; + if (UserIsDesktopWindow(Wnd->spwndParent)) + Parent = 0; co_UserSetFocus(Parent); } // Hide, just return. @@ -2753,7 +2754,7 @@ IntRealChildWindowFromPoint(PWND Parent, LONG x, LONG y) Pt.x = x; Pt.y = y; - if (Parent != UserGetDesktopWindow()) + if (!UserIsDesktopWindow(Parent)) { Pt.x += Parent->rcClient.left; Pt.y += Parent->rcClient.top; @@ -2795,7 +2796,7 @@ IntChildWindowFromPointEx(PWND Parent, LONG x, LONG y, UINT uiFlags) Pt.x = x; Pt.y = y; - if (Parent != UserGetDesktopWindow()) + if (!UserIsDesktopWindow(Parent)) { if (Parent->ExStyle & WS_EX_LAYOUTRTL) Pt.x = Parent->rcClient.right - Pt.x; @@ -3059,9 +3060,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo, } pWnd = UserGetWindowObject(Wnd); - if ( !pWnd || // FIXME: - pWnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - pWnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd)) { goto Exit; } @@ -3072,9 +3071,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo, WndInsertAfter != HWND_NOTOPMOST ) { pWndIA = UserGetWindowObject(WndInsertAfter); - if ( !pWndIA || - pWndIA == UserGetDesktopWindow() || - pWndIA == UserGetMessageWindow() ) + if (!pWndIA || UserIsDesktopWindow(pWndIA) || UserIsMessageWindow(pWndIA)) { goto Exit; } @@ -3221,9 +3218,7 @@ NtUserMinMaximize( UserEnterExclusive(); pWnd = UserGetWindowObject(hWnd); - if ( !pWnd || // FIXME: - pWnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - pWnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd)) { goto Exit; } @@ -3302,9 +3297,8 @@ NtUserSetWindowPos( TRACE("Enter NtUserSetWindowPos\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { ERR("NtUserSetWindowPos bad window handle!\n"); RETURN(FALSE); @@ -3316,8 +3310,7 @@ NtUserSetWindowPos( hWndInsertAfter != HWND_NOTOPMOST ) { if (!(pWndIA = UserGetWindowObject(hWndInsertAfter)) || - pWndIA == UserGetDesktopWindow() || - pWndIA == UserGetMessageWindow() ) + UserIsDesktopWindow(pWndIA) || UserIsMessageWindow(pWndIA)) { ERR("NtUserSetWindowPos bad insert window handle!\n"); RETURN(FALSE); @@ -3370,9 +3363,8 @@ NtUserSetWindowRgn( TRACE("Enter NtUserSetWindowRgn\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { RETURN( 0); } @@ -3432,8 +3424,7 @@ NtUserSetInternalWindowPos( UserEnterExclusive(); if (!(Wnd = UserGetWindowObject(hwnd)) || // FIXME: - Wnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Wnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + UserIsDesktopWindow(Wnd) || UserIsMessageWindow(Wnd)) { RETURN( FALSE); } @@ -3501,9 +3492,8 @@ NtUserSetWindowPlacement(HWND hWnd, TRACE("Enter NtUserSetWindowPlacement\n"); UserEnterExclusive(); - if (!(Wnd = UserGetWindowObject(hWnd)) || // FIXME: - Wnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Wnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Wnd = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Wnd) || UserIsMessageWindow(Wnd)) { RETURN( FALSE); } @@ -3552,9 +3542,8 @@ NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow) TRACE("Enter NtUserShowWindowAsync\n"); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { RETURN(FALSE); } @@ -3592,9 +3581,8 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow) TRACE("Enter NtUserShowWindow hWnd %p SW_ %d\n",hWnd, nCmdShow); UserEnterExclusive(); - if (!(Window = UserGetWindowObject(hWnd)) || // FIXME: - Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP - Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND + if (!(Window = UserGetWindowObject(hWnd)) || + UserIsDesktopWindow(Window) || UserIsMessageWindow(Window)) { RETURN(FALSE); }