[ros-diffs] [jimtabor] 29940: Use DC object member hHmgr instead of hSelf. hSelf is used for MemoryDC and SaveDC.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Sun Oct 28 21:50:31 CET 2007


Author: jimtabor
Date: Sun Oct 28 23:50:31 2007
New Revision: 29940

URL: http://svn.reactos.org/svn/reactos?rev=29940&view=rev
Log:
Use DC object member hHmgr instead of hSelf. hSelf is used for MemoryDC and SaveDC.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/objects/arc.c
    trunk/reactos/subsystems/win32/win32k/objects/dc.c
    trunk/reactos/subsystems/win32/win32k/objects/dcutil.c

Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/dc.h?rev=29940&r1=29939&r2=29940&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h Sun Oct 28 23:50:31 2007
@@ -59,10 +59,10 @@
 
 typedef struct _DC
 {
-  HGDIOBJ     hHmgr;
-  PVOID       pvEntry;
-  ULONG       lucExcLock;
-  ULONG       Tid;
+  HGDIOBJ     hHmgr;  // Handle for this DC object.
+//  PVOID       pvEntry;
+//  ULONG       lucExcLock;
+//  ULONG       Tid;
 
   DHPDEV      PDev;
   INT         DC_Type;
@@ -70,7 +70,7 @@
   PDC_ATTR    pDc_Attr;
   DC_ATTR     Dc_Attr;
 
-  HDC         hSelf;
+  HDC         hSelf;  // Used only for MemoryDC & SaveDC.
   HDC         hNext;
   HSURF       FillPatternSurfaces[HS_DDI_MAX];
   PGDIINFO    GDIInfo;

Modified: trunk/reactos/subsystems/win32/win32k/objects/arc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/arc.c?rev=29940&r1=29939&r2=29940&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/arc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/arc.c Sun Oct 28 23:50:31 2007
@@ -43,7 +43,7 @@
     HWND hWnd;
     PWINDOW_OBJECT Window;
 
-    hWnd = IntWindowFromDC(dc->hSelf);
+    hWnd = IntWindowFromDC((HDC) dc->hHmgr);
     Window = UserGetWindowObject(hWnd);
     if(!Window) return FALSE;
 

Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dc.c?rev=29940&r1=29939&r2=29940&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Sun Oct 28 23:50:31 2007
@@ -2409,6 +2409,7 @@
     NewDC->DriverName.Buffer = Buf;
   }
 
+  NewDC->hHmgr = (HGDIOBJ) hDC; // Save the handle for this DC object.
   NewDC->w.xformWorld2Wnd.eM11 = 1.0f;
   NewDC->w.xformWorld2Wnd.eM12 = 0.0f;
   NewDC->w.xformWorld2Wnd.eM21 = 0.0f;

Modified: trunk/reactos/subsystems/win32/win32k/objects/dcutil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dcutil.c?rev=29940&r1=29939&r2=29940&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dcutil.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dcutil.c Sun Oct 28 23:50:31 2007
@@ -87,7 +87,7 @@
   BOOL Ret = FALSE;
   KeEnterCriticalRegion();
     {
-      INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)dc->hSelf);
+      INT Index = GDI_HANDLE_GET_INDEX(dc->hHmgr);
       PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
       HANDLE ProcessId = (HANDLE)(((ULONG_PTR)(Entry->ProcessId)) & ~1);
       DC_ATTR lDc_AttrData;




More information about the Ros-diffs mailing list