forked from pool/xorg-x11-server
Stefan Dirsch
1afa6139ff
* Use last Screen section found to prefer xorg.conf (bnc #661536, bfo #32430) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=318
57 lines
1.9 KiB
Diff
57 lines
1.9 KiB
Diff
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 {
|
|
+ /* 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
|
|
|