Author: fireball Date: Sat Jan 15 21:33:09 2011 New Revision: 50394
URL: http://svn.reactos.org/svn/reactos?rev=50394&view=rev Log: - Solve one of the most visible and historical drawing problem of arwinss: improper clipping. E.g. child windows borders being "visible" in an explorer window is an example, FAP drawing issues an another. All redrawing bugs should be retested to see what's fixed. - Add a "clipchildren" property to the DC. This property affects only those DCs which have a root window (screen) selected. A better name for this variable would be welcome. - Important! The change in behaviour introduced by ClipChildren is currently commented out until some issues it brings are solved.
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c branches/arwinss/reactos/subsystems/win32/win32k/include/dc.h
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Sat Jan 15 21:33:09 2011 @@ -169,6 +169,7 @@ /* Create an empty combined clipping region */ pNewDC->CombinedClip = EngCreateClip(); pNewDC->Clipping = NULL; + pNewDC->ClipChildren = FALSE;
/* Set default palette */ pNewDC->dclevel.hpal = StockObjects[DEFAULT_PALETTE]; @@ -487,6 +488,12 @@ return; }
+ /* Root window's visibility may be ignored */ + if ((pDC->pWindow == &SwmRoot) && !pDC->ClipChildren) + { + //IgnoreVisibility = TRUE; + } + /* window visibility X user clipping (if any) X underlying surface */
/* Acquire SWM lock */ @@ -598,6 +605,10 @@ /* Set the clipping object */ pDC->Clipping = create_region_from_rects(pSafeRects, count); } + else + { + pDC->Clipping = create_empty_region(); + }
DPRINT("RosGdiSetDeviceClipping() for DC %x, bounding rect (%d,%d)-(%d, %d)\n", physDev, rcSafeBounds.left, rcSafeBounds.top, rcSafeBounds.right, rcSafeBounds.bottom); @@ -693,6 +704,10 @@ pDC->pWindow = NULL; DPRINT("hdc %x, restricting any drawing\n", physDev); } + + pDC->ClipChildren = clipChildren; + + RosGdiUpdateClipping(pDC, FALSE);
/* Release the object */ DC_UnlockDc(pDC);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/dc.h URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Sat Jan 15 21:33:09 2011 @@ -38,6 +38,7 @@ struct region *Clipping; CLIPOBJ *CombinedClip; PSWM_WINDOW pWindow; + BOOLEAN ClipChildren; } DC, *PDC;
#define DC_LockDc(hDC) \