summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2013-12-19 11:31:21 -0600
committerChristophe Fergeau <cfergeau@redhat.com>2014-02-24 11:50:27 +0100
commit6e2e82e6fbb8927d5154f32c83e2b95c08fef18e (patch)
treef5f0c99e39fd1ef6cc48a5fd742739f11aa3afa0
parent9ae51f3702b1fc0d2747e44474c87a818d1e8ec3 (diff)
downloadvd_agent-6e2e82e6fbb8927d5154f32c83e2b95c08fef18e.tar.gz
vd_agent-6e2e82e6fbb8927d5154f32c83e2b95c08fef18e.tar.xz
vd_agent-6e2e82e6fbb8927d5154f32c83e2b95c08fef18e.zip
Don't abort if XRRSetCrtcConfig fails
In certain configurations (Fedora 20 or RHEL7 guests on a RHEL6 host), this call fails, which cause the vdagent to abort. This patch prevents the crash, though arbitrary resizing is obviously still non-functional in this situation.
-rw-r--r--src/vdagent-x11-randr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c
index 5fcfcc8..0ed5246 100644
--- a/src/vdagent-x11-randr.c
+++ b/src/vdagent-x11-randr.c
@@ -364,11 +364,11 @@ static int xrandr_add_and_set(struct vdagent_x11 *x11, int output, int x, int y,
x11->randr.monitor_sizes[output].width = width;
x11->randr.monitor_sizes[output].height = height;
outputs[0] = xid;
+ vdagent_x11_set_error_handler(x11, error_handler);
s = XRRSetCrtcConfig(x11->display, x11->randr.res, x11->randr.res->crtcs[output],
CurrentTime, x, y, mode->id, RR_Rotate_0, outputs,
1);
-
- if (s != RRSetConfigSuccess) {
+ if (vdagent_x11_restore_error_handler(x11) || (s != RRSetConfigSuccess)) {
syslog(LOG_ERR, "failed to XRRSetCrtcConfig");
x11->set_crtc_config_not_functional = 1;
return 0;