1 | --- b/mi/miexpose.c.orig 2015-11-22 23:24:46.000000000 +0100 |
---|
2 | +++ a/mi/miexpose.c 2015-11-23 00:07:27.000000000 +0100 |
---|
3 | @@ -428,6 +428,19 @@ |
---|
4 | Bool solid = TRUE; |
---|
5 | DrawablePtr drawable = &pWin->drawable; |
---|
6 | |
---|
7 | +#ifdef XQUARTZ_CLIP_DEBUG |
---|
8 | + ErrorF("START %d BS %d (pR = %ld)\n", what, pWin->backgroundState, ParentRelative); |
---|
9 | + ErrorF(" Rgn: %d %d %d %d\n", prgn->extents.x1, prgn->extents.y1, |
---|
10 | + prgn->extents.x2 - prgn->extents.x1, |
---|
11 | + prgn->extents.y2 - prgn->extents.y1); |
---|
12 | + ErrorF(" Win: %d %d (%d %d) %d %d\n", pWin->origin.x, pWin->origin.y, |
---|
13 | + pWin->winSize.extents.x1, pWin->winSize.extents.y1, |
---|
14 | + pWin->winSize.extents.x2 - pWin->winSize.extents.x1, |
---|
15 | + pWin->winSize.extents.y2 - pWin->winSize.extents.y1); |
---|
16 | + ErrorF(" Draw: %d %d %d %d\n", pWin->drawable.x, pWin->drawable.y, |
---|
17 | + pWin->drawable.width, pWin->drawable.height); |
---|
18 | +#endif |
---|
19 | + |
---|
20 | if (what == PW_BACKGROUND) { |
---|
21 | while (pWin->backgroundState == ParentRelative) |
---|
22 | pWin = pWin->parent; |
---|
23 | @@ -462,6 +475,11 @@ |
---|
24 | pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable); |
---|
25 | drawable = &pixmap->drawable; |
---|
26 | |
---|
27 | +#ifdef XQUARTZ_CLIP_DEBUG |
---|
28 | + ErrorF(" Draw: %d %d %d %d\n", |
---|
29 | + drawable->x, drawable->y, drawable->width, drawable->height); |
---|
30 | +#endif |
---|
31 | + |
---|
32 | while (pWin->backgroundState == ParentRelative) |
---|
33 | pWin = pWin->parent; |
---|
34 | |
---|
35 | @@ -528,6 +546,57 @@ |
---|
36 | ChangeGC(NullClient, pGC, gcmask, gcval); |
---|
37 | ValidateGC(drawable, pGC); |
---|
38 | |
---|
39 | +#ifdef XQUARTZ_CLIP_DEBUG |
---|
40 | + ErrorF(" GC: %d %d %d %d\n", |
---|
41 | + pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1, |
---|
42 | + pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1, |
---|
43 | + pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1); |
---|
44 | +#endif |
---|
45 | + |
---|
46 | +#ifdef XQUARTZ |
---|
47 | + /* Looks like our clipping isn't set right for some reason: |
---|
48 | + * http://xquartz.macosforge.org/trac/ticket/290 |
---|
49 | + */ |
---|
50 | + if(what == PW_BORDER) { |
---|
51 | + |
---|
52 | +#if 0 |
---|
53 | + if(solid) { |
---|
54 | +#if 1 |
---|
55 | + fbFillRegionSolid(&pWin->drawable, |
---|
56 | + prgn, |
---|
57 | + 0, |
---|
58 | + fbReplicatePixel(fill.pixel, |
---|
59 | + pWin->drawable.bitsPerPixel)); |
---|
60 | +#else |
---|
61 | + fbFillRegionSolid(drawable, |
---|
62 | + prgn, |
---|
63 | + 0, |
---|
64 | + fbReplicatePixel(fill.pixel, |
---|
65 | + drawable->bitsPerPixel)); |
---|
66 | +#endif |
---|
67 | + return; |
---|
68 | + } |
---|
69 | +#endif |
---|
70 | + |
---|
71 | + pGC->pCompositeClip->extents.x1 += prgn->extents.x1; |
---|
72 | + pGC->pCompositeClip->extents.y1 += prgn->extents.y1; |
---|
73 | + pGC->pCompositeClip->extents.x2 += prgn->extents.x1; |
---|
74 | + pGC->pCompositeClip->extents.y2 += prgn->extents.y1; |
---|
75 | + |
---|
76 | + if(pGC->pCompositeClip->extents.x2 > drawable->pScreen->width) |
---|
77 | + pGC->pCompositeClip->extents.x2 = drawable->pScreen->width; |
---|
78 | + if(pGC->pCompositeClip->extents.y2 > drawable->pScreen->height) |
---|
79 | + pGC->pCompositeClip->extents.y2 = drawable->pScreen->height; |
---|
80 | + } |
---|
81 | +#endif |
---|
82 | + |
---|
83 | +#ifdef XQUARTZ_CLIP_DEBUG |
---|
84 | + ErrorF(" GC: %d %d %d %d\n", |
---|
85 | + pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1, |
---|
86 | + pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1, |
---|
87 | + pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1); |
---|
88 | +#endif |
---|
89 | + |
---|
90 | numRects = RegionNumRects(prgn); |
---|
91 | pbox = RegionRects(prgn); |
---|
92 | for (i = numRects; --i >= 0; pbox++, prect++) { |
---|