From 1a489142c8e6a4828348cc9afbd0f430d3b1e2d8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 23 Oct 2012 23:43:50 +0100 Subject: [PATCH] sna: Disable RandR hotplug events if Xinerama is enabled Since RandR itself is disabled if Xinerama is enabled, for example with ZaphodHeads, calling RRGetInfo() upon a hotplug event generates an assertion. Reported-by: Stephen Liang Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55260 Signed-off-by: Chris Wilson --- src/sna/sna_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 4a3bd04..b7bd84a 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -639,6 +639,12 @@ sna_uevent_init(ScrnInfoPtr scrn) DBG(("%s\n", __FUNCTION__)); + /* RandR will be disabled if Xinerama is active, and so generating + * RR hotplug events is then verboten. + */ + if (!dixPrivateKeyRegistered(rrPrivKey)) + return; + if (!xf86GetOptValBool(sna->Options, OPTION_HOTPLUG, &hotplug)) from = X_DEFAULT, hotplug = TRUE; xf86DrvMsg(scrn->scrnIndex, from, "hotplug detection: \"%s\"\n", -- 1.7.10.4