diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-25 08:59:58 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-25 08:59:58 +0000 |
commit | bfd51e205639b468479985c3c631e5d9c76d5fa7 (patch) | |
tree | b6f31da23ba46d0680f4234c90db807cccbbe95c /tools/virtual.c | |
parent | 278ef8f7bc0c7f63737ad5f5e967ca253c2571cb (diff) |
intel-virtual-output: Add a little more DBG around damaging clones
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/virtual.c')
-rw-r--r-- | tools/virtual.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index f153523f..9d018846 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -1301,6 +1301,9 @@ ungrab: if (clone->dst.rr_crtc == 0) continue; + DBG(("%s-%s: added to active list\n", + DisplayString(dst->dpy), dst->name)); + clone->active = ctx->active; ctx->active = clone; } @@ -1659,12 +1662,17 @@ static void clone_damage(struct clone *c, const XRectangle *rec) { if (rec->x < c->damaged.x1) c->damaged.x1 = rec->x; - if (rec->x + rec->width > c->damaged.x2) - c->damaged.x2 = rec->x + rec->width; + if (rec->width > c->damaged.x2 - rec->x) + c->damaged.x2 = (int)rec->x + rec->width; if (rec->y < c->damaged.y1) c->damaged.y1 = rec->y; - if (rec->y + rec->height > c->damaged.y2) - c->damaged.y2 = rec->y + rec->height; + if (rec->height > c->damaged.y2 - rec->y) + c->damaged.y2 = (int)rec->y + rec->height; + + DBG(("%s-%s damaged: (%d, %d), (%d, %d)\n", + DisplayString(c->dst->dpy), c->dst->name, + c->damaged.x1, c->damaged.y1, + c->damaged.x2, c->damaged.y2)); } static void usage(const char *arg0) |