summaryrefslogtreecommitdiff
path: root/composite/compwindow.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-08-13 08:16:14 +0000
committerKeith Packard <keithp@keithp.com>2004-08-13 08:16:14 +0000
commita29bfbd3d0a5d39ccee5b83ac1ba632091b031bb (patch)
treeb087d11fa09d5f36f7a3b34e6333bfa8b0e6d50c /composite/compwindow.c
parent24bed5cff908a6f8b1857e3dadac22d6db54c69e (diff)
Empty damage object when freeing pixmap.
Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB visual (avoids lovely green tint to screen). Also, set visual->nplanes of ARGB visual to all used (including alpha) planes so DIX can set pixel values correctly. Translate automatic update regions correctly to account for borders When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to allocated pixel values. Remove redundant fbAddTraps declaration Fix fbCopyWindow to work on non-screen pixmaps (not needed yet) Replace broken clipping code with that from modular tree. Respect subWindowMode.
Diffstat (limited to 'composite/compwindow.c')
-rw-r--r--composite/compwindow.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 29883666e..314593f25 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -667,15 +667,32 @@ compWindowUpdateAutomatic (WindowPtr pWin)
&subwindowMode,
serverClient,
&error);
-
+
+ /*
+ * First move the region from window to screen coordinates
+ */
REGION_TRANSLATE (pScreen, pRegion,
- pSrcPixmap->screen_x, pSrcPixmap->screen_y);
+ pWin->drawable.x, pWin->drawable.y);
+
+ /*
+ * Clip against the "real" border clip
+ */
REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip);
+
+ /*
+ * Now translate from screen to pixmap coordinates
+ */
REGION_TRANSLATE (pScreen, pRegion,
-pSrcPixmap->screen_x, -pSrcPixmap->screen_y);
+ /*
+ * Clip the picture
+ */
SetPictureClipRegion (pSrcPicture, 0, 0, pRegion);
+ /*
+ * And paint
+ */
CompositePicture (PictOpSrc,
pSrcPicture,
0,
@@ -689,6 +706,10 @@ compWindowUpdateAutomatic (WindowPtr pWin)
pSrcPixmap->drawable.height);
FreePicture (pSrcPicture, 0);
FreePicture (pDstPicture, 0);
+ /*
+ * Empty the damage region. This has the nice effect of
+ * rendering the translations above harmless
+ */
DamageEmpty (cw->damage);
}