Skip to content

Commit 206b677

Browse files
peterhsunweaver
authored andcommitted
Xserver/mi/miexpose.c: Fix border tile origin when background is ParentRelative
commit b4061cf5f76241157b2dc81dec053012075311c0 Author: Peter Harris <[email protected]> Date: Tue May 12 14:19:15 2015 -0400 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 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 <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> Backported-to-NX-by: Mike Gabriel <[email protected]>
1 parent a850caf commit 206b677

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

nx-X11/programs/Xserver/mi/miexpose.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,15 +625,21 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
625625
{
626626
PixmapPtr pixmap;
627627

628-
tile_x_off = drawable->x;
629-
tile_y_off = drawable->y;
628+
fill = pWin->border;
629+
solid = pWin->borderIsPixel;
630630

631631
/* servers without pixmaps draw their own borders */
632632
if (!pScreen->GetWindowPixmap)
633633
return;
634634
pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
635635
drawable = &pixmap->drawable;
636636

637+
while (pWin->backgroundState == ParentRelative)
638+
pWin = pWin->parent;
639+
640+
tile_x_off = pWin->drawable.x;
641+
tile_y_off = pWin->drawable.y;
642+
637643
#ifdef COMPOSITE
638644
draw_x_off = pixmap->screen_x;
639645
draw_y_off = pixmap->screen_y;
@@ -643,8 +649,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
643649
draw_x_off = 0;
644650
draw_y_off = 0;
645651
#endif
646-
fill = pWin->border;
647-
solid = pWin->borderIsPixel;
648652
}
649653

650654
gcval[0].val = GXcopy;

0 commit comments

Comments
 (0)