[ros-diffs] [fireball] 47034: - SWM: Create clipping region in a shorter way for SwmDc (previously due to passing NULL in rcBounds parameter to RosGdiSetDeviceClipping it was not really fully initialized). Should fix issues with copying contents of a moving window.

fireball at svn.reactos.org fireball at svn.reactos.org
Mon Apr 26 15:21:19 CEST 2010


Author: fireball
Date: Mon Apr 26 15:21:19 2010
New Revision: 47034

URL: http://svn.reactos.org/svn/reactos?rev=47034&view=rev
Log:
- SWM: Create clipping region in a shorter way for SwmDc (previously due to passing NULL in rcBounds parameter to RosGdiSetDeviceClipping it was not really fully initialized). Should fix issues with copying contents of a moving window.

Modified:
    branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c

Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c?rev=47034&r1=47033&r2=47034&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] Mon Apr 26 15:21:19 2010
@@ -61,13 +61,26 @@
 SwmCreateScreenDc()
 {
     ROS_DCINFO RosDc;
+    PDC pDC;
+    RECTL rcBounds;
 
     /* Create the display DC */
     RtlZeroMemory(&RosDc, sizeof(ROS_DCINFO));
     RosDc.dwType = OBJ_DC;
     SwmDc = (HDC)0;
     RosGdiCreateDC(&RosDc, &SwmDc, NULL, NULL, NULL, NULL);
-    RosGdiSetDeviceClipping(SwmDc, 0, NULL, NULL);
+
+    /* Set clipping to full screen */
+    pDC = DC_Lock(SwmDc);
+    RECTL_vSetRect(&rcBounds,
+                   0,
+                   0,
+                   pDC->rcVport.right,
+                   pDC->rcVport.bottom);
+    IntEngDeleteClipRegion(pDC->CombinedClip);
+    pDC->CombinedClip = IntEngCreateClipRegion(1, &rcBounds, &rcBounds);
+    DC_Unlock(pDC);
+    //RosGdiSetDeviceClipping(SwmDc, 1, &rcBounds, &rcBounds);
 
     /* Make it global */
     GDIOBJ_SetOwnership(SwmDc, NULL);




More information about the Ros-diffs mailing list