diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-22 12:34:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-22 20:55:55 +0100 |
commit | 8d1e9afb60a61bf490a282a16db1c15a9ad7d077 (patch) | |
tree | 1097aa9be1a2a2d3a09826de224b90c991bb4ea5 /tools/virtual.c | |
parent | 0f0cd87c66a4e373ab9b26626514d43b5f4978e5 (diff) |
intel-virtual-output: Probe after claiming virtual output
Rerun a detection cycle after claiming the virtual output so that it is
hidden again.
References: https://bugs.freedesktop.org/show_bug.cgi?id=78293
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/virtual.c')
-rw-r--r-- | tools/virtual.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index d1076174..1d490c5a 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -784,6 +784,10 @@ static RROutput claim_virtual(struct display *display, char *output_name, int nc XRRDeleteOutputMode(dpy, rr_output, id); XRRDestroyMode(dpy, id); + /* And hide it again */ + res = XRRGetScreenResources(dpy, display->root); + if (res != NULL) + XRRFreeScreenResources(res); out: XUngrabServer(dpy); @@ -2852,9 +2856,14 @@ static void context_cleanup(struct context *ctx) continue; } } + XRRFreeScreenResources(res); + + /* And hide them again */ + res = XRRGetScreenResources(dpy, ctx->display->root); + if (res != NULL) + XRRFreeScreenResources(res); XUngrabServer(dpy); - XRRFreeScreenResources(res); if (ctx->singleton) XDeleteProperty(dpy, ctx->display->root, ctx->singleton); |