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/win3…
==============================================================================
--- 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/win3…
==============================================================================
--- 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) \
Author: tkreuzer
Date: Sat Jan 15 19:13:22 2011
New Revision: 50391
URL: http://svn.reactos.org/svn/reactos?rev=50391&view=rev
Log:
[NTOSKRNL]
Fix comments and reduce code complexity.
Modified:
trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Sat Jan 15 19:13:22 2011
@@ -127,7 +127,7 @@
NTAPI
PsGetNextProcess(IN PEPROCESS OldProcess)
{
- PLIST_ENTRY Entry, ListHead;
+ PLIST_ENTRY Entry;
PEPROCESS FoundProcess = NULL;
PAGED_CODE();
PSTRACE(PS_PROCESS_DEBUG, "Process: %p\n", OldProcess);
@@ -147,11 +147,10 @@
Entry = PsActiveProcessHead.Flink;
}
- /* Set the list head and start looping */
- ListHead = &PsActiveProcessHead;
- while (ListHead != Entry)
- {
- /* Get the Thread */
+ /* Loop the process list */
+ while (Entry != &PsActiveProcessHead)
+ {
+ /* Get the process */
FoundProcess = CONTAINING_RECORD(Entry, EPROCESS, ActiveProcessLinks);
/* Reference the process */
@@ -165,7 +164,7 @@
/* Release the lock */
KeReleaseGuardedMutex(&PspActiveProcessMutex);
- /* Reference the Process we had referenced earlier */
+ /* Dereference the Process we had referenced earlier */
if (OldProcess) ObDereferenceObject(OldProcess);
return FoundProcess;
}
@@ -621,7 +620,7 @@
SeAuditProcessCreationInfo.
ImageFileName);
if (!NT_SUCCESS(Status)) goto CleanupWithRef;
-
+
//
// We need a PEB
//
@@ -641,7 +640,7 @@
ASSERTMSG("No support for cloning yet\n", FALSE);
}
else
- {
+ {
/* This is the initial system process */
Flags &= ~PS_LARGE_PAGES;
Status = MmInitializeProcessAddressSpace(Process,
@@ -713,7 +712,7 @@
RtlZeroMemory(&InitialPeb, sizeof(INITIAL_PEB));
InitialPeb.Mutant = (HANDLE)-1;
InitialPeb.ImageUsesLargePages = 0; // FIXME: Not yet supported
-
+
//
// Create it only if we have an image section
//
@@ -850,7 +849,7 @@
/* Run the Notification Routines */
PspRunCreateProcessNotifyRoutines(Process, TRUE);
-
+
/* If 12 processes have been created, enough of user-mode is ready */
if (++ProcessCount == 12) Ki386PerfEnd();