diff --git a/use-last-screen.patch b/use-last-screen.patch new file mode 100644 index 0000000..b1aa046 --- /dev/null +++ b/use-last-screen.patch @@ -0,0 +1,56 @@ +From ee0e658bb6cb0d1290072090f1de90ff44145365 Mon Sep 17 00:00:00 2001 +From: Dan Nicholson +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 +--- + 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 + diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 5f3a65f..8823ec3 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 27 22:41:54 UTC 2010 - sndirsch@novell.com + +- use-last-screen.patch + * Use last Screen section found to prefer xorg.conf (bnc #661536, + bfo #32430) + ------------------------------------------------------------------- Tue Dec 21 18:21:22 UTC 2010 - sndirsch@novell.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 0f65e69..b5818fa 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -120,6 +120,7 @@ Patch218: CVE-2010-2240-tree_depth_limit.patch Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch Patch221: commit-5c6a2f9.diff Patch222: sync-fix.patch +Patch223: use-last-screen.patch %if %moblin Patch300: moblin-use_preferred_mode_for_all_outputs.diff %endif @@ -250,6 +251,7 @@ popd %patch220 -p1 %patch221 -p1 %patch222 -p1 +%patch223 -p1 %if %moblin %patch300 -p1 %endif