diff options
author | Peter Harris <pharris@opentext.com> | 2015-05-12 14:19:15 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-06-29 21:07:58 -0700 |
commit | b4061cf5f76241157b2dc81dec053012075311c0 (patch) | |
tree | e43ff68e7f712b160a88d1d8781174f12b339a04 | |
parent | 8a8d51358cea782147bb9b5b2e0902b1e47fcf4a (diff) |
Fix border tile origin when background is ParentRelative
According to
http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:CreateWindow
"The border tile origin is always the same as the background tile
origin."
ChangeWindowAttributes goes to some effort to make sure it repaints
the border tile whenever the background origin may have changed, but
miPaintWindow was ignoring the background origin.
Found by xts XChangeWindowAttributes-3
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | mi/miexpose.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index c4118f16a..4124d67c6 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -478,14 +478,21 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) else { PixmapPtr pixmap; - tile_x_off = drawable->x; - tile_y_off = drawable->y; + fill = pWin->border; + solid = pWin->borderIsPixel; /* servers without pixmaps draw their own borders */ if (!pScreen->GetWindowPixmap) return; pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable); drawable = &pixmap->drawable; + + while (pWin->backgroundState == ParentRelative) + pWin = pWin->parent; + + tile_x_off = pWin->drawable.x; + tile_y_off = pWin->drawable.y; + #ifdef COMPOSITE draw_x_off = pixmap->screen_x; draw_y_off = pixmap->screen_y; @@ -495,8 +502,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) draw_x_off = 0; draw_y_off = 0; #endif - fill = pWin->border; - solid = pWin->borderIsPixel; } gcval[0].val = GXcopy; |