Skip to content

Commit

Permalink
Xserver/mi/miexpose.c: Fix border tile origin when background is Pare…
Browse files Browse the repository at this point in the history
…ntRelative

 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]>
  • Loading branch information
peterh authored and sunweaver committed Apr 14, 2017
1 parent a850caf commit 206b677
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions nx-X11/programs/Xserver/mi/miexpose.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,21 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
{
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;
Expand All @@ -643,8 +649,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;
Expand Down

0 comments on commit 206b677

Please sign in to comment.