Author: jimtabor Date: Thu Jul 2 23:09:32 2009 New Revision: 41744
URL: http://svn.reactos.org/svn/reactos?rev=41744&view=rev Log: - In the process of rewriting IntGdiCreateDisplayDC, making it an intermediate level support function for IntGdiCreateDC.
Modified: trunk/reactos/subsystems/win32/win32k/include/desktop.h trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/objects/dclife.c
Modified: trunk/reactos/subsystems/win32/win32k/include/desktop.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/desktop.h [iso-8859-1] Thu Jul 2 23:09:32 2009 @@ -110,22 +110,17 @@ KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PDESKTOP *Object); - NTSTATUS FASTCALL IntParseDesktopPath(PEPROCESS Process, PUNICODE_STRING DesktopPath, HWINSTA *hWinSta, HDESK *hDesktop); - -BOOL FASTCALL -IntDesktopUpdatePerUserSettings(BOOL bEnable); - +BOOL FASTCALL IntDesktopUpdatePerUserSettings(BOOL bEnable); VOID APIENTRY UserRedrawDesktop(VOID); - BOOL IntRegisterShellHookWindow(HWND hWnd); BOOL IntDeRegisterShellHookWindow(HWND hWnd); - VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam); +HDC FASTCALL UserGetDesktopDC(ULONG,BOOL,BOOL);
#define IntIsActiveDesktop(Desktop) \ ((Desktop)->WindowStation->ActiveDesktop == (Desktop))
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntd... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] Thu Jul 2 23:09:32 2009 @@ -698,20 +698,7 @@ APIENTRY DxEngGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd) { - PWINDOW_OBJECT DesktopObject = 0; - HDC DesktopHDC = 0; - - if (DcType == DC_TYPE_DIRECT) - { - DesktopObject = UserGetDesktopWindow(); - DesktopHDC = (HDC)UserGetWindowDC(DesktopObject); - } - else - { - UNIMPLEMENTED; - } - - return DesktopHDC; + return UserGetDesktopDC(DcType, EmptyDC, ValidatehWnd); }
/************************************************************************/
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Thu Jul 2 23:09:32 2009 @@ -617,6 +617,27 @@ }
/* PUBLIC FUNCTIONS ***********************************************************/ + +HDC FASTCALL +UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd) +{ + PWINDOW_OBJECT DesktopObject = 0; + HDC DesktopHDC = 0; + + if (DcType == DC_TYPE_DIRECT) + { + DesktopObject = UserGetDesktopWindow(); + DesktopHDC = (HDC)UserGetWindowDC(DesktopObject); + } + else + { + HDEV hDev; + hDev = (HDEV)pPrimarySurface; + DesktopHDC = IntGdiCreateDisplayDC(hDev, DcType, EmptyDC); + } + + return DesktopHDC; +}
VOID APIENTRY UserRedrawDesktop()
Modified: trunk/reactos/subsystems/win32/win32k/objects/dclife.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Thu Jul 2 23:09:32 2009 @@ -432,6 +432,7 @@
// // If NULL, first time through! Build the default (was window) dc! +// Setup clean DC state for the system. // if (hDC && !defaultDCstate) // Ultra HAX! Dedicated to GvG! { // This is a cheesy way to do this.