xserver: Branch 'master'

Alan Hourihane alanh at kemper.freedesktop.org
Thu Aug 24 05:56:35 PDT 2006


 hw/xwin/winmultiwindowwndproc.c |   20 +++++++++-----------
 hw/xwin/winshadgdi.c            |    7 ++++---
 2 files changed, 13 insertions(+), 14 deletions(-)

New commits:
diff-tree ce4a0a4ddafd3833d7025f83ed3729915c8aba70 (from 67bd672c880869ef625ae0c0163c3ec1eba46abf)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date:   Thu Aug 24 13:56:22 2006 +0100

    Apply patch in bug #7919, blit improvements in
    multiwindow mode for Xming/CygwinX

diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index e359744..0df896d 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -304,7 +304,6 @@ winTopLevelWindowProc (HWND hwnd, UINT m
   winScreenInfo		*s_pScreenInfo = NULL;
   HWND			hwndScreen = NULL;
   DrawablePtr		pDraw = NULL;
-  int		        iX, iY, iWidth, iHeight, iBorder;
   winWMMessageRec	wmMsg;
   Bool                  fWMMsgInitialized = FALSE;
   static Bool		s_fTracking = FALSE;
@@ -442,20 +441,19 @@ winTopLevelWindowProc (HWND hwnd, UINT m
 
       /* BeginPaint gives us an hdc that clips to the invalidated region */
       hdcUpdate = BeginPaint (hwnd, &ps);
-
-      /* Get the position and dimensions of the window */
-      iBorder = wBorderWidth (pWin);
-      iX = pWin->drawable.x;
-      iY = pWin->drawable.y;
-      iWidth = pWin->drawable.width;
-      iHeight = pWin->drawable.height;
+      /* Avoid the BitBlt's if the PAINTSTRUCT is bogus */
+      if (ps.rcPaint.right==0 && ps.rcPaint.bottom==0 && ps.rcPaint.left==0 && ps.rcPaint.top==0)
+      {
+	EndPaint (hwndScreen, &ps);
+	return 0;
+      }
 
       /* Try to copy from the shadow buffer */
       if (!BitBlt (hdcUpdate,
-		   0, 0,
-		   iWidth, iHeight,
+		   ps.rcPaint.left, ps.rcPaint.top,
+		   ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top,
 		   s_pScreenPriv->hdcShadow,
-		   iX, iY,
+		   ps.rcPaint.left + pWin->drawable.x, ps.rcPaint.top + pWin->drawable.y,
 		   SRCCOPY))
 	{
 	  LPVOID lpMsgBuf;
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index ba98192..04cc2f7 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -540,8 +540,9 @@ winShadowUpdateGDI (ScreenPtr pScreen, 
    * handle large regions by creating a clipping region and 
    * doing a single blit constrained to that clipping region.
    */
-  if (pScreenInfo->dwClipUpdatesNBoxes == 0
-      || dwBox < pScreenInfo->dwClipUpdatesNBoxes)
+  if (!pScreenInfo->fMultiWindow &&
+      (pScreenInfo->dwClipUpdatesNBoxes == 0 ||
+      dwBox < pScreenInfo->dwClipUpdatesNBoxes))
     {
       /* Loop through all boxes in the damaged region */
       while (dwBox--)
@@ -566,7 +567,7 @@ winShadowUpdateGDI (ScreenPtr pScreen, 
 	  ++pBox;
 	}
     }
-  else
+  else if (!pScreenInfo->fMultiWindow)
     {
       /* Compute a GDI region from the damaged region */
       hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2);



More information about the xorg-commit mailing list