Incomplete support for WS_EX_TRANSPARENT, should fix Task Manager painting bugs.

svn path=/trunk/; revision=17963
This commit is contained in:
Filip Navara 2005-09-21 13:49:09 +00:00
parent 32e72ac4f3
commit eca43c5532
4 changed files with 26 additions and 11 deletions

View file

@ -602,13 +602,28 @@ HWND FASTCALL
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 @@ IntFindWindowToRepaint(PWINDOW_OBJECT Window, PW32THREAD Thread)
hChild = IntFindWindowToRepaint(Window->FirstChild, Thread);
if (hChild != NULL)
return hChild;
}
Window = Window->NextSibling;
}
}
return NULL;

View file

@ -89,7 +89,8 @@ VIS_ComputeVisibleRegion(
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 @@ VIS_ComputeVisibleRegion(
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 */

View file

@ -342,7 +342,6 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
Flags |= DCX_CACHE;
}
if (Flags & DCX_USESTYLE)
{
Flags &= ~(DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS | DCX_PARENTCLIP);

View file

@ -1118,7 +1118,8 @@ co_WinPosSetWindowPos(
* 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);