Commit 1da6dbab authored by Jerome Vouillon's avatar Jerome Vouillon Committed by Alexandre Julliard

Make a correct use of clipping rectangles.

parent ab6415ce
...@@ -536,42 +536,36 @@ void X11DRV_WND_PreSizeMove(WND *wndPtr) ...@@ -536,42 +536,36 @@ void X11DRV_WND_PreSizeMove(WND *wndPtr)
void X11DRV_WND_PostSizeMove(WND *wndPtr) void X11DRV_WND_PostSizeMove(WND *wndPtr)
{ {
if (!(wndPtr->dwStyle & WS_CHILD) && if (!(wndPtr->dwStyle & WS_CHILD) &&
(X11DRV_GetXRootWindow(wndPtr) == DefaultRootWindow(display))) (X11DRV_GetXRootWindow() == DefaultRootWindow(display)))
TSXUngrabServer( display ); TSXUngrabServer( display );
} }
/***************************************************************** /*****************************************************************
* X11DRV_WND_ScrollWindow * X11DRV_WND_ScrollWindow
*/ */
void X11DRV_WND_ScrollWindow( void X11DRV_WND_ScrollWindow(
WND *wndPtr, DC *dcPtr, INT32 dx, INT32 dy, WND *wndPtr, DC *dcPtr, INT32 dx, INT32 dy,
const RECT32 *clipRect, BOOL32 bUpdate) const RECT32 *rect, BOOL32 bUpdate)
{ {
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dcPtr->physDev; X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dcPtr->physDev;
POINT32 dst, src; POINT32 dst, src;
if( dx > 0 ) dst.x = (src.x = dcPtr->w.DCOrgX + clipRect->left) + dx; dst.x = (src.x = dcPtr->w.DCOrgX + rect->left) + dx;
else src.x = (dst.x = dcPtr->w.DCOrgX + clipRect->left) - dx; dst.y = (src.y = dcPtr->w.DCOrgY + rect->top) + dy;
if( dy > 0 ) dst.y = (src.y = dcPtr->w.DCOrgY + clipRect->top) + dy;
else src.y = (dst.y = dcPtr->w.DCOrgY + clipRect->top) - dy;
if ((clipRect->right - clipRect->left > abs(dx)) && if (bUpdate) /* handles non-Wine windows hanging over the scrolled area */
(clipRect->bottom - clipRect->top > abs(dy))) TSXSetGraphicsExposures( display, physDev->gc, True );
{ TSXSetFunction( display, physDev->gc, GXcopy );
if (bUpdate) /* handles non-Wine windows hanging over the scrolled area */ TSXCopyArea( display, physDev->drawable, physDev->drawable,
TSXSetGraphicsExposures( display, physDev->gc, True ); physDev->gc, src.x, src.y,
TSXSetFunction( display, physDev->gc, GXcopy ); rect->right - rect->left,
TSXCopyArea( display, physDev->drawable, physDev->drawable, rect->bottom - rect->top,
physDev->gc, src.x, src.y, dst.x, dst.y );
clipRect->right - clipRect->left - abs(dx), if (bUpdate)
clipRect->bottom - clipRect->top - abs(dy), TSXSetGraphicsExposures( display, physDev->gc, False );
dst.x, dst.y );
if (bUpdate) if (bUpdate) /* Make sure exposure events have been processed */
TSXSetGraphicsExposures( display, physDev->gc, False ); EVENT_Synchronize();
}
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment