* Tue Jul 28 2009 Adam Jackson <ajax@redhat.com> 1.6.99-21.20090724
- xserver-1.6.99-right-of.patch: Default to right-of initial placement for RANDR 1.2 drivers with enough virtual space.
This commit is contained in:
parent
34b04ed531
commit
f76b04d899
@ -19,7 +19,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.6.99
|
||||
Release: 20.%{gitdate}%{?dist}
|
||||
Release: 21.%{gitdate}%{?dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -76,8 +76,8 @@ Patch6023: xserver-1.6.99-use-pci-access-boot.patch
|
||||
# ajax needs to upstream this
|
||||
Patch6027: xserver-1.6.0-displayfd.patch
|
||||
Patch6028: xserver-1.6.99-randr-error-debugging.patch
|
||||
|
||||
Patch6042: xserver-1.6.1-proc-cmdline.patch
|
||||
Patch6029: xserver-1.6.1-proc-cmdline.patch
|
||||
Patch6030: xserver-1.6.99-right-of.patch
|
||||
|
||||
%define moduledir %{_libdir}/xorg/modules
|
||||
%define drimoduledir %{_libdir}/dri
|
||||
@ -525,6 +525,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jul 28 2009 Adam Jackson <ajax@redhat.com> 1.6.99-21.20090724
|
||||
- xserver-1.6.99-right-of.patch: Default to right-of initial placement
|
||||
for RANDR 1.2 drivers with enough virtual space.
|
||||
|
||||
* Tue Jul 28 2009 Adam Jackson <ajax@redhat.com> 1.6.99-20.20090724
|
||||
- xserver-1.6.99-use-pci-access-boot.patch: Some chips (thanks Intel) will
|
||||
change their PCI class at runtime if you disable their VGA decode, so
|
||||
|
124
xserver-1.6.99-right-of.patch
Normal file
124
xserver-1.6.99-right-of.patch
Normal file
@ -0,0 +1,124 @@
|
||||
From 9d16f202248b0ca29b832d28441871b96d0b040d Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Tue, 28 Jul 2009 11:07:13 -0400
|
||||
Subject: [PATCH] RANDR: right-of placement by default
|
||||
|
||||
---
|
||||
hw/xfree86/modes/xf86Crtc.c | 71 ++++++++++++++++++++++++++++++++++++++----
|
||||
1 files changed, 64 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 94fc158..4f14a75 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -1140,6 +1140,15 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
|
||||
int o;
|
||||
int min_x, min_y;
|
||||
|
||||
+ /* check for initial right-of heuristic */
|
||||
+ for (o = 0; o < config->num_output; o++)
|
||||
+ {
|
||||
+ xf86OutputPtr output = config->output[o];
|
||||
+
|
||||
+ if (output->initial_x || output->initial_y)
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
for (o = 0; o < config->num_output; o++)
|
||||
{
|
||||
xf86OutputPtr output = config->output[o];
|
||||
@@ -2025,6 +2034,54 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
|
||||
return match;
|
||||
}
|
||||
|
||||
+static int
|
||||
+numEnabledOutputs(xf86CrtcConfigPtr config, Bool *enabled)
|
||||
+{
|
||||
+ int i = 0, p;
|
||||
+
|
||||
+ for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ;
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+static Bool
|
||||
+xf86TargetRightOf(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||
+ DisplayModePtr *modes, Bool *enabled,
|
||||
+ int width, int height)
|
||||
+{
|
||||
+ int o;
|
||||
+ int w = 0;
|
||||
+
|
||||
+ if (numEnabledOutputs(config, enabled) < 2)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
||||
+ DisplayModePtr mode =
|
||||
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
||||
+
|
||||
+ if (!mode)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ w += mode->HDisplay;
|
||||
+ }
|
||||
+
|
||||
+ if (w > width)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ w = 0;
|
||||
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
||||
+ DisplayModePtr mode =
|
||||
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
||||
+
|
||||
+ config->output[o]->initial_x = w;
|
||||
+ w += mode->HDisplay;
|
||||
+
|
||||
+ modes[o] = mode;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static Bool
|
||||
xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||
DisplayModePtr *modes, Bool *enabled,
|
||||
@@ -2082,13 +2139,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||
* biggest mode for its aspect ratio, assuming one exists.
|
||||
*/
|
||||
if (!ret) do {
|
||||
- int i = 0;
|
||||
float aspect = 0.0;
|
||||
|
||||
- /* count the number of enabled outputs */
|
||||
- for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ;
|
||||
-
|
||||
- if (i != 1)
|
||||
+ if (numEnabledOutputs(config, enabled) != 1)
|
||||
break;
|
||||
|
||||
p = -1;
|
||||
@@ -2375,6 +2428,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||
|
||||
if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
|
||||
+ else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height))
|
||||
+ xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n");
|
||||
else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
|
||||
else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
||||
@@ -2391,8 +2446,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||
config->output[o]->name);
|
||||
else
|
||||
xf86DrvMsg (scrn->scrnIndex, X_INFO,
|
||||
- "Output %s using initial mode %s\n",
|
||||
- config->output[o]->name, modes[o]->name);
|
||||
+ "Output %s using initial mode %s +%d+%d\n",
|
||||
+ config->output[o]->name, modes[o]->name,
|
||||
+ config->output[o]->initial_x,
|
||||
+ config->output[o]->initial_y);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.6.3.3
|
||||
|
Loading…
Reference in New Issue
Block a user