diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-25 09:49:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-25 09:49:20 +0100 |
commit | b645ec83e0d86f2247b8338ceab60b9502516e70 (patch) | |
tree | 7f2fccdbf78b54091fcffd07de7f7495f6303b82 /uxa | |
parent | 9d8ac271404ff219c3d40ae8f829e8b76ac7c359 (diff) |
uxa: Apply the drawable offset to the solid rects
Fixes:
Bug 28120 - Tint2's tooltip borders end up at 0,0 and do not disappear
https://bugs.freedesktop.org/show_bug.cgi?id=28120
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-render.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index ec59871b..41daf064 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -899,7 +899,8 @@ uxa_acquire_mask(ScreenPtr screen, static Bool _pixman_region_init_rectangles(pixman_region16_t *region, int num_rects, - xRectangle *rects) + xRectangle *rects, + int tx, int ty) { pixman_box16_t stack_boxes[64], *boxes = stack_boxes; pixman_bool_t ret; @@ -912,10 +913,10 @@ _pixman_region_init_rectangles(pixman_region16_t *region, } for (i = 0; i < num_rects; i++) { - boxes[i].x1 = rects[i].x; - boxes[i].y1 = rects[i].y; - boxes[i].x2 = rects[i].x + rects[i].width; - boxes[i].y2 = rects[i].y + rects[i].height; + boxes[i].x1 = rects[i].x + tx; + boxes[i].y1 = rects[i].y + ty; + boxes[i].x2 = rects[i].x + tx + rects[i].width; + boxes[i].y2 = rects[i].y + ty + rects[i].height; } ret = pixman_region_init_rects(region, boxes, num_rects); @@ -952,7 +953,9 @@ uxa_solid_rects (CARD8 op, if (!dst_pixmap) goto fallback; - if (!_pixman_region_init_rectangles(®ion, num_rects, rects)) + if (!_pixman_region_init_rectangles(®ion, + num_rects, rects, + dst->pDrawable->x, dst->pDrawable->y)) goto fallback; if (!pixman_region_intersect(®ion, ®ion, dst->pCompositeClip)) { |