diff --git a/win32ss/user/ntuser/desktop.c b/win32ss/user/ntuser/desktop.c index eae7a8b2ef2..84cac5fb47b 100644 --- a/win32ss/user/ntuser/desktop.c +++ b/win32ss/user/ntuser/desktop.c @@ -1209,13 +1209,12 @@ IntValidateDesktopHandle( { NTSTATUS Status; - Status = ObReferenceObjectByHandle( - Desktop, - DesiredAccess, - ExDesktopObjectType, - AccessMode, - (PVOID*)Object, - NULL); + Status = ObReferenceObjectByHandle(Desktop, + DesiredAccess, + ExDesktopObjectType, + AccessMode, + (PVOID*)Object, + NULL); TRACE("IntValidateDesktopHandle: handle:0x%p obj:0x%p access:0x%x Status:0x%lx\n", Desktop, *Object, DesiredAccess, Status); @@ -1319,7 +1318,7 @@ IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue) { gpqForeground = NULL; ERR("ptiLastInput is CLEARED!!\n"); - ptiLastInput = NULL; // ReactOS hacks,,,, should check for process death. + ptiLastInput = NULL; // ReactOS hacks... should check for process death. } } @@ -1570,12 +1569,10 @@ UserRedrawDesktop(VOID) Window = UserGetDesktopWindow(); Rgn = IntSysCreateRectpRgnIndirect(&Window->rcWindow); - IntInvalidateWindows( Window, - Rgn, - RDW_FRAME | - RDW_ERASE | - RDW_INVALIDATE | - RDW_ALLCHILDREN); + IntInvalidateWindows(Window, + Rgn, + RDW_FRAME | RDW_ERASE | + RDW_INVALIDATE | RDW_ALLCHILDREN); REGION_Delete(Rgn); } @@ -2448,7 +2445,7 @@ IntCreateDesktop( pdesk->spwndMessage = pWnd; pWnd->fnid = FNID_MESSAGEWND; - /* Now,,, + /* Now... if !(WinStaObject->Flags & WSF_NOIO) is (not set) for desktop input output mode (see wiki) Create Tooltip. Saved in DesktopObject->spwndTooltip. Tooltip dwExStyle: WS_EX_TOOLWINDOW|WS_EX_TOPMOST @@ -2646,11 +2643,11 @@ NtUserOpenInputDesktop( HDESK hdesk; UserEnterExclusive(); - TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop); + TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop 0x%p\n", gpdeskInputDesktop); hdesk = UserOpenInputDesktop(dwFlags, fInherit, dwDesiredAccess); - TRACE("NtUserOpenInputDesktop returning 0x%p\n",hdesk); + TRACE("NtUserOpenInputDesktop returning 0x%p\n", hdesk); UserLeave(); return hdesk; } @@ -2714,7 +2711,7 @@ NtUserCloseDesktop(HDESK hDesktop) RETURN(TRUE); CLEANUP: - TRACE("Leave NtUserCloseDesktop, ret=%i\n",_ret_); + TRACE("Leave NtUserCloseDesktop, ret=%i\n", _ret_); UserLeave(); END_CLEANUP; } @@ -2738,10 +2735,13 @@ BOOL APIENTRY NtUserPaintDesktop(HDC hDC) { BOOL Ret; + UserEnterExclusive(); TRACE("Enter NtUserPaintDesktop\n"); + Ret = IntPaintDesktop(hDC); - TRACE("Leave NtUserPaintDesktop, ret=%i\n",Ret); + + TRACE("Leave NtUserPaintDesktop, ret=%i\n", Ret); UserLeave(); return Ret; } @@ -2966,13 +2966,13 @@ NtUserSwitchDesktop(HDESK hdesk) /* Show the new desktop window */ co_IntShowDesktop(pdesk, UserGetSystemMetrics(SM_CXSCREEN), UserGetSystemMetrics(SM_CYSCREEN), bRedrawDesktop); - TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop); + TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n", gpdeskInputDesktop); ObDereferenceObject(pdesk); RETURN(TRUE); CLEANUP: - TRACE("Leave NtUserSwitchDesktop, ret=%i\n",_ret_); + TRACE("Leave NtUserSwitchDesktop, ret=%i\n", _ret_); UserLeave(); END_CLEANUP; } diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 016eb89d955..d7877395159 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -739,7 +739,7 @@ IntGetWindowProc(PWND pWnd, PCLS Class; WNDPROC gcpd, Ret = 0; - ASSERT(UserIsEnteredExclusive() == TRUE); + ASSERT(UserIsEnteredExclusive()); Class = pWnd->pcls; diff --git a/win32ss/user/user32/windows/window.c b/win32ss/user/user32/windows/window.c index d414259515c..078e496a0ea 100644 --- a/win32ss/user/user32/windows/window.c +++ b/win32ss/user/user32/windows/window.c @@ -150,20 +150,20 @@ RtlFreeLargeString( DWORD FASTCALL -RtlGetExpWinVer( HMODULE hModule ) +RtlGetExpWinVer(HMODULE hModule) { DWORD dwMajorVersion = 3; // Set default to Windows 3.10. DWORD dwMinorVersion = 10; PIMAGE_NT_HEADERS pinth; - if ( hModule && !LOWORD( ((ULONG_PTR)hModule) )) + if (hModule && !LOWORD((ULONG_PTR)hModule)) { - pinth = RtlImageNtHeader( hModule ); - if ( pinth ) + pinth = RtlImageNtHeader(hModule); + if (pinth) { dwMajorVersion = pinth->OptionalHeader.MajorSubsystemVersion; - if ( dwMajorVersion == 1 ) + if (dwMajorVersion == 1) { dwMajorVersion = 3; }