Incomplete support for WS_EX_TRANSPARENT, should fix Task Manager painting bugs. Modified: trunk/reactos/subsys/win32k/ntuser/painting.c Modified: trunk/reactos/subsys/win32k/ntuser/vis.c Modified: trunk/reactos/subsys/win32k/ntuser/windc.c Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c _____
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c --- trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -602,13 +602,28 @@
IntFindWindowToRepaint(PWINDOW_OBJECT Window, PW32THREAD Thread) { HWND hChild; + PWINDOW_OBJECT TempWindow;
- while (Window != NULL) + for (; Window != NULL; Window = Window->NextSibling) { - /* FIXME: Transparent windows. */ - if (IntIsWindowDirty(Window) && - IntWndBelongsToThread(Window, Thread)) + if (IntWndBelongsToThread(Window, Thread) && + IntIsWindowDirty(Window)) { + /* Make sure all non-transparent siblings are already drawn. */ + if (Window->ExStyle & WS_EX_TRANSPARENT) + { + for (TempWindow = Window->NextSibling; TempWindow != NULL; + TempWindow = TempWindow->NextSibling) + { + if (!(TempWindow->ExStyle & WS_EX_TRANSPARENT) && + IntWndBelongsToThread(TempWindow, Thread) && + IntIsWindowDirty(TempWindow)) + { + return TempWindow->hSelf; + } + } + } + return Window->hSelf; }
@@ -617,9 +632,7 @@ hChild = IntFindWindowToRepaint(Window->FirstChild, Thread); if (hChild != NULL) return hChild; - } - - Window = Window->NextSibling; + } }
return NULL; _____
Modified: trunk/reactos/subsys/win32k/ntuser/vis.c --- trunk/reactos/subsys/win32k/ntuser/vis.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/vis.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -89,7 +89,8 @@
CurrentSibling = CurrentWindow->FirstChild; while (CurrentSibling != NULL && CurrentSibling != PreviousWindow) { - if (CurrentSibling->Style & WS_VISIBLE) + if ((CurrentSibling->Style & WS_VISIBLE) && + !(CurrentSibling->ExStyle & WS_EX_TRANSPARENT)) { ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentSibling->WindowRect); /* Combine it with the window region if available */ @@ -115,7 +116,8 @@ CurrentWindow = Window->FirstChild; while (CurrentWindow) { - if (CurrentWindow->Style & WS_VISIBLE) + if ((CurrentWindow->Style & WS_VISIBLE) && + !(CurrentWindow->ExStyle & WS_EX_TRANSPARENT)) { ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWindow->WindowRect); /* Combine it with the window region if available */ _____
Modified: trunk/reactos/subsys/win32k/ntuser/windc.c --- trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -342,7 +342,6 @@
Flags |= DCX_CACHE; }
- if (Flags & DCX_USESTYLE) { Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP); _____
Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c --- trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-09-21 03:20:07 UTC (rev 17962) +++ trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-09-21 13:49:09 UTC (rev 17963) @@ -1118,7 +1118,8 @@
* change. */ if (VisBefore != NULL && VisAfter != NULL && !(WinPos.flags & SWP_NOCOPYBITS) && - ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW))) + ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) && + !(Window->ExStyle & WS_EX_TRANSPARENT)) { CopyRgn = NtGdiCreateRectRgn(0, 0, 0, 0); RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);