summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-25 09:49:20 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-25 16:43:57 +0100
commit5d98c28513bbfdc8c618688df961a122197bdc3c (patch)
treea82880118dd8f92c958e05d8abb37fc802b01b19 /uxa
parent1f4ca9c1073c628383acd37dc5f7c3da986b4747 (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> (cherry picked from commit b645ec83e0d86f2247b8338ceab60b9502516e70) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-render.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index a22ae01a..94100d19 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -862,7 +862,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;
@@ -875,10 +876,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);
@@ -915,7 +916,9 @@ uxa_solid_rects (CARD8 op,
if (!dst_pixmap)
goto fallback;
- if (!_pixman_region_init_rectangles(&region, num_rects, rects))
+ if (!_pixman_region_init_rectangles(&region,
+ num_rects, rects,
+ dst->pDrawable->x, dst->pDrawable->y))
goto fallback;
if (!pixman_region_intersect(&region, &region, dst->pCompositeClip)) {