1
0
xorg-x11-server/use-last-screen.patch

57 lines
2.0 KiB
Diff
Raw Normal View History

From ee0e658bb6cb0d1290072090f1de90ff44145365 Mon Sep 17 00:00:00 2001
From: Dan Nicholson <dbn.lists@gmail.com>
Date: Thu, 16 Dec 2010 06:01:06 -0800
Subject: [PATCH] xfree86: Use last Screen section found to prefer xorg.conf
Allowing multiple .conf files with xorg.conf.d works well for InputClass
where any section in xorg.conf would override settings from previous
.conf files typically installed by the distro. This does not work well
with Screen sections where the first section found has been used when
the Layout doesn't specify a Screen. Instead, use the last Screen
section found to give preference to xorg.conf and match the InputScreen
semantics.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
---
hw/xfree86/common/xf86Config.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5800700..b2fc8e3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1678,7 +1678,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
}
/*
- * No layout section, so find the first Screen section and set that up as
+ * No layout section, so find the last Screen section and set that up as
* the only active screen.
*/
static Bool
@@ -1697,7 +1697,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
/*
* which screen section is the active one?
*
- * If there is a -screen option, use that one, otherwise use the first
+ * If there is a -screen option, use that one, otherwise use the last
* one.
*/
@@ -1710,6 +1710,12 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
}
conf_screen = s;
from = X_CMDLINE;
+ } else if (conf_screen) {
+ /* Use the last Screen in the list */
+ s = conf_screen;
+ while (s->list.next)
+ s = s->list.next;
+ conf_screen = s;
}
/* We have exactly one screen */
--
1.7.2.3