Removed dependencies on the internals of the region object.
Do not store the region type in the object, it's trivial to determine
from the rectangle count.
Rewrote a few routines to not depend on internal clipping or region
functions.
diff --git a/dlls/ttydrv/wnd.c b/dlls/ttydrv/wnd.c
index 949f751..ac65fe7 100644
--- a/dlls/ttydrv/wnd.c
+++ b/dlls/ttydrv/wnd.c
@@ -22,7 +22,6 @@
#include "gdi.h"
#include "ttydrv.h"
-#include "region.h"
#include "win.h"
#include "winpos.h"
#include "wine/debug.h"
@@ -203,6 +202,7 @@
WND *pWnd;
int i;
HWND *list = WIN_ListChildren( parent );
+ HRGN hrgn = 0;
if (!list) return;
for (i = 0; list[i]; i++)
@@ -217,15 +217,14 @@
rect.bottom = pWnd->rectWindow.bottom + y;
if( IntersectRect( &rect, &rect, lpRect ))
{
- if(!REGION_UnionRectWithRgn( hrgnClip, &rect ))
- {
- WIN_ReleaseWndPtr( pWnd );
- break;
- }
+ if (!hrgn) hrgn = CreateRectRgnIndirect( &rect );
+ else SetRectRgn( hrgn, rect.left, rect.top, rect.right, rect.bottom );
+ CombineRgn( hrgnClip, hrgnClip, hrgn, RGN_OR );
}
}
WIN_ReleaseWndPtr( pWnd );
}
+ if (hrgn) DeleteObject( hrgn );
HeapFree( GetProcessHeap(), 0, list );
}