summaryrefslogtreecommitdiff
path: root/fb/fbwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'fb/fbwindow.c')
-rw-r--r--fb/fbwindow.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index ebf35bba8..9e70d56e1 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/fb/fbwindow.c,v 1.1.4.3.2.2 2004/03/04 17:47:28 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/fb/fbwindow.c,v 1.4 2004/08/13 08:16:14 keithp Exp $ */
/*
* Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
@@ -122,9 +122,12 @@ fbCopyWindow(WindowPtr pWin,
{
RegionRec rgnDst;
int dx, dy;
- WindowPtr pwinRoot;
-
- pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
+#ifdef COMPOSITE
+ PixmapPtr pPixmap = fbGetWindowPixmap (pWin);
+ DrawablePtr pDrawable = &pPixmap->drawable;
+#else
+ DrawablePtr pDrawable = &WindowTable[pWin->drawable.pScreen->myNum]->drawable;
+#endif
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -134,7 +137,13 @@ fbCopyWindow(WindowPtr pWin,
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
- fbCopyRegion ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
+#ifdef COMPOSITE
+ if (pPixmap->screen_x || pPixmap->screen_y)
+ REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ -pPixmap->screen_x, -pPixmap->screen_y);
+#endif
+
+ fbCopyRegion (pDrawable, pDrawable,
0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);