diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 18:10:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 19:49:35 +0100 |
commit | 1b07f16ffeb3152817e9e4f77ca0f2c403fb9040 (patch) | |
tree | 292cd5212b4add66ffa6f884ba06ba31b8de988c /tools/virtual.c | |
parent | 088ff35b3941724c59707cf7971c09f9a15e5ddb (diff) |
intel-virtual-overlay: Fix logic inversion from previous commit
"if (!active == 0)"
Whoops, but keep the debugging that highlighted the error.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/virtual.c')
-rw-r--r-- | tools/virtual.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index ba443b2d..b4d4460e 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -690,6 +690,8 @@ static void context_update(struct context *ctx) int context_changed = 0; int i, n; + DBG(("%s\n", __func__)); + res = XRRGetScreenResourcesCurrent(dpy, ctx->display->root); if (res == NULL) return; @@ -709,6 +711,11 @@ static void context_update(struct context *ctx) if (o->crtc) c = XRRGetCrtcInfo(dpy, res, o->crtc); if (c) { + DBG(("%s-%s: (x=%d, y=%d, rotation=%d, mode=%ld) -> (x=%d, y=%d, rotation=%d, mode=%ld)\n", + DisplayString(ctx->display->dpy), output->name, + output->x, output->y, output->rotation, output->mode.id, + c->x, c->y, output->rotation, c->mode)); + changed |= output->rotation |= c->rotation; output->rotation = c->rotation; @@ -721,6 +728,10 @@ static void context_update(struct context *ctx) changed |= output->mode.id != mode; mode = c->mode; XRRFreeCrtcInfo(c); + } else { + DBG(("%s-%s: (x=%d, y=%d, rotation=%d, mode=%ld) -> off\n", + DisplayString(ctx->display->dpy), output->name, + output->x, output->y, output->rotation, output->mode.id)); } output->rr_crtc = o->crtc; XRRFreeOutputInfo(o); @@ -739,12 +750,16 @@ static void context_update(struct context *ctx) output->mode.id = 0; } + DBG(("%s-%s changed? %d\n", + DisplayString(ctx->clones[n].dst.display->dpy), ctx->clones[n].dst.name, changed)); + if (changed) clone_init_xfer(&ctx->clones[n]); context_changed |= changed; } XRRFreeScreenResources(res); + DBG(("%s changed? %d\n", DisplayString(ctx->display->dpy), context_changed)); if (!context_changed) return; @@ -753,7 +768,7 @@ static void context_update(struct context *ctx) struct clone *clone; int x1, x2, y1, y2; - if (!display->rr_active == 0) + if (display->rr_active == 0) continue; x1 = y1 = INT_MAX; @@ -994,6 +1009,7 @@ static int clone_output_init(struct clone *clone, struct output *output, output->dpy = dpy; output->rr_output = rr_output; + output->rotation = RR_Rotate_0; output->window = display->root; output->use_shm = display->has_shm; |