server 1.12.1
- force autoreconf to avoid libtool errors - update patches for new indentation style.
This commit is contained in:
parent
8a80c5bd94
commit
a03561534d
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ xorg-server-1.9.1.tar.bz2
|
|||||||
/xorg-server-20120124.tar.xz
|
/xorg-server-20120124.tar.xz
|
||||||
/xorg-server-20120215.tar.xz
|
/xorg-server-20120215.tar.xz
|
||||||
/xorg-server-1.12.0.tar.bz2
|
/xorg-server-1.12.0.tar.bz2
|
||||||
|
/xorg-server-1.12.1.tar.bz2
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
3a3c4281f32c8702749e8f129372a355 xorg-server-1.12.0.tar.bz2
|
20e73b422bda6f0d1405af676983cc70 xorg-server-1.12.1.tar.bz2
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
|
|
||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.12.0
|
Version: 1.12.1
|
||||||
Release: 6%{?gitdate:.%{gitdate}}%{dist}
|
Release: 1%{?gitdate:.%{gitdate}}%{dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -369,7 +369,7 @@ test `getminor extension` == %{extension_minor}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# --with-pie ?
|
# --with-pie ?
|
||||||
autoreconf -v --install || exit 1
|
autoreconf -f -v --install || exit 1
|
||||||
# export CFLAGS="${RPM_OPT_FLAGS}"
|
# export CFLAGS="${RPM_OPT_FLAGS}"
|
||||||
%configure --enable-maintainer-mode %{xservers} \
|
%configure --enable-maintainer-mode %{xservers} \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
@ -574,6 +574,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{xserver_source_dir}
|
%{xserver_source_dir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 14 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.12.1-1
|
||||||
|
- server 1.12.1
|
||||||
|
- force autoreconf to avoid libtool errors
|
||||||
|
- update patches for new indentation style.
|
||||||
|
|
||||||
* Mon May 14 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-6
|
* Mon May 14 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-6
|
||||||
- Make timers signal-safe (#814869)
|
- Make timers signal-safe (#814869)
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
From 56a6a585918f1aa84da244dec803783cd90b92ac Mon Sep 17 00:00:00 2001
|
From db8153bd5f476114f6a1b7ac40357c8bc39331ef Mon Sep 17 00:00:00 2001
|
||||||
From: Dan Horák <dan@danny.cz>
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||||
Date: Wed, 29 Jun 2011 15:08:27 +0200
|
Date: Wed, 29 Jun 2011 15:08:27 +0200
|
||||||
Subject: [PATCH] test subdir requires xorg to be built
|
Subject: [PATCH 5/7] test subdir requires xorg to be built
|
||||||
|
|
||||||
Something changed between 20110418 and 20110510 and the test subdir is now
|
Something changed between 20110418 and 20110510 and the test subdir is now
|
||||||
processed. But it needs some libraries that are built as part of xorg driver.
|
processed. But it needs some libraries that are built as part of xorg driver.
|
||||||
---
|
---
|
||||||
Makefile.am | 5 +++--
|
Makefile.am | 5 +++--
|
||||||
1 files changed, 3 insertions(+), 2 deletions(-)
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
index 62c8d95..bc4091d 100644
|
index cea140b..72f3d74 100644
|
||||||
--- a/Makefile.am
|
--- a/Makefile.am
|
||||||
+++ b/Makefile.am
|
+++ b/Makefile.am
|
||||||
@@ -38,8 +38,7 @@ SUBDIRS = \
|
@@ -39,8 +39,7 @@ SUBDIRS = \
|
||||||
$(GLX_DIR) \
|
$(GLX_DIR) \
|
||||||
exa \
|
exa \
|
||||||
config \
|
config \
|
||||||
@ -23,7 +23,7 @@ index 62c8d95..bc4091d 100644
|
|||||||
|
|
||||||
if XORG
|
if XORG
|
||||||
aclocaldir = $(datadir)/aclocal
|
aclocaldir = $(datadir)/aclocal
|
||||||
@@ -47,6 +46,8 @@ aclocal_DATA = xorg-server.m4
|
@@ -48,6 +47,8 @@ aclocal_DATA = xorg-server.m4
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = xorg-server.pc
|
pkgconfig_DATA = xorg-server.pc
|
||||||
@ -33,5 +33,5 @@ index 62c8d95..bc4091d 100644
|
|||||||
|
|
||||||
EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh
|
EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh
|
||||||
--
|
--
|
||||||
1.7.4.4
|
1.7.10.1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 080b3903ee57a682ac67306d7ff855bbf1dccda3 Mon Sep 17 00:00:00 2001
|
From 5d16c39108c72b08478b6bd548494d6c675495ee Mon Sep 17 00:00:00 2001
|
||||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
Date: Wed, 4 Jan 2012 09:31:51 +1000
|
Date: Wed, 4 Jan 2012 09:31:51 +1000
|
||||||
Subject: [PATCH] Xext: fix selinux build failure
|
Subject: [PATCH 6/7] Xext: fix selinux build failure
|
||||||
|
|
||||||
The server builds with -Werror=missing-braces, causing
|
The server builds with -Werror=missing-braces, causing
|
||||||
|
|
||||||
@ -22,31 +22,31 @@ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
|
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
|
||||||
index 0d4c9ab..943e5cc 100644
|
index e9c7e93..0302f2f 100644
|
||||||
--- a/Xext/xselinux_hooks.c
|
--- a/Xext/xselinux_hooks.c
|
||||||
+++ b/Xext/xselinux_hooks.c
|
+++ b/Xext/xselinux_hooks.c
|
||||||
@@ -848,7 +848,7 @@ SELinuxFlaskReset(void)
|
@@ -851,7 +851,7 @@ SELinuxFlaskReset(void)
|
||||||
void
|
void
|
||||||
SELinuxFlaskInit(void)
|
SELinuxFlaskInit(void)
|
||||||
{
|
{
|
||||||
- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 };
|
- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 };
|
||||||
+ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *)0 } };
|
+ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *) 0 } };
|
||||||
security_context_t ctx;
|
security_context_t ctx;
|
||||||
int ret = TRUE;
|
int ret = TRUE;
|
||||||
|
|
||||||
diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
|
diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c
|
||||||
index e5929fa..de49f83 100644
|
index 2c33d1c..81f2f36 100644
|
||||||
--- a/Xext/xselinux_label.c
|
--- a/Xext/xselinux_label.c
|
||||||
+++ b/Xext/xselinux_label.c
|
+++ b/Xext/xselinux_label.c
|
||||||
@@ -354,7 +354,7 @@ SELinuxDefaultClientLabel(void)
|
@@ -361,7 +361,7 @@ SELinuxDefaultClientLabel(void)
|
||||||
void
|
void
|
||||||
SELinuxLabelInit(void)
|
SELinuxLabelInit(void)
|
||||||
{
|
{
|
||||||
- struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 };
|
- struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 };
|
||||||
+ struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } };
|
+ struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } };
|
||||||
|
|
||||||
label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
|
label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1);
|
||||||
if (!label_hnd)
|
if (!label_hnd)
|
||||||
--
|
--
|
||||||
1.7.7.4
|
1.7.10.1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 7089841a7e026799328e97292c2f81aa4aa01f57 Mon Sep 17 00:00:00 2001
|
From be0213313d42beeaaa4aa4a9637f2df8a849c98e Mon Sep 17 00:00:00 2001
|
||||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
Date: Fri, 27 Apr 2012 10:52:39 +1000
|
Date: Fri, 27 Apr 2012 10:52:39 +1000
|
||||||
Subject: [PATCH] os: make timers signal-safe
|
Subject: [PATCH 7/7] os: make timers signal-safe
|
||||||
|
|
||||||
If TimerSet() is called from a signal handler (synaptics tap handling code)
|
If TimerSet() is called from a signal handler (synaptics tap handling code)
|
||||||
may result in list corruption if we're currently inside TimerSet().
|
may result in list corruption if we're currently inside TimerSet().
|
||||||
@ -13,28 +13,23 @@ Block signals for all list manipulations in the timers.
|
|||||||
|
|
||||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
||||||
(cherry picked from commit 08962951de969b9d8c870af8b6e47303dc0decfd)
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
|
|
||||||
os/WaitFor.c
|
|
||||||
---
|
---
|
||||||
os/WaitFor.c | 18 ++++++++++++++++--
|
os/WaitFor.c | 18 ++++++++++++++++--
|
||||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/os/WaitFor.c b/os/WaitFor.c
|
diff --git a/os/WaitFor.c b/os/WaitFor.c
|
||||||
index 867cb04..236406e 100644
|
index 4c3be34..59f3af6 100644
|
||||||
--- a/os/WaitFor.c
|
--- a/os/WaitFor.c
|
||||||
+++ b/os/WaitFor.c
|
+++ b/os/WaitFor.c
|
||||||
@@ -405,6 +405,7 @@ CheckAllTimers(void)
|
@@ -382,6 +382,7 @@ CheckAllTimers(void)
|
||||||
OsTimerPtr timer;
|
OsTimerPtr timer;
|
||||||
CARD32 now;
|
CARD32 now;
|
||||||
|
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
start:
|
start:
|
||||||
now = GetTimeInMillis();
|
now = GetTimeInMillis();
|
||||||
|
|
||||||
@@ -414,6 +415,7 @@ start:
|
@@ -391,6 +392,7 @@ CheckAllTimers(void)
|
||||||
goto start;
|
goto start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,45 +37,44 @@ index 867cb04..236406e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -421,11 +423,13 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
|
@@ -398,11 +400,13 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
|
||||||
{
|
{
|
||||||
CARD32 newTime;
|
CARD32 newTime;
|
||||||
|
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
*prev = timer->next;
|
*prev = timer->next;
|
||||||
timer->next = NULL;
|
timer->next = NULL;
|
||||||
newTime = (*timer->callback)(timer, now, timer->arg);
|
newTime = (*timer->callback) (timer, now, timer->arg);
|
||||||
if (newTime)
|
if (newTime)
|
||||||
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
|
TimerSet(timer, 0, newTime, timer->callback, timer->arg);
|
||||||
+ OsReleaseSignals();
|
+ OsReleaseSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
OsTimerPtr
|
OsTimerPtr
|
||||||
@@ -443,6 +447,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
@@ -418,6 +422,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
for (prev = &timers; *prev; prev = &(*prev)->next)
|
for (prev = &timers; *prev; prev = &(*prev)->next) {
|
||||||
{
|
if (*prev == timer) {
|
||||||
if (*prev == timer)
|
*prev = timer->next;
|
||||||
@@ -453,6 +458,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
@@ -426,6 +431,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ OsReleaseSignals();
|
+ OsReleaseSignals();
|
||||||
}
|
}
|
||||||
if (!millis)
|
if (!millis)
|
||||||
return timer;
|
return timer;
|
||||||
@@ -473,29 +479,35 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
@@ -445,26 +451,32 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
|
||||||
if (!millis)
|
if (!millis)
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
for (prev = &timers;
|
for (prev = &timers;
|
||||||
*prev && (int) ((*prev)->expires - millis) <= 0;
|
*prev && (int) ((*prev)->expires - millis) <= 0;
|
||||||
prev = &(*prev)->next)
|
prev = &(*prev)->next);
|
||||||
;
|
|
||||||
timer->next = *prev;
|
timer->next = *prev;
|
||||||
*prev = timer;
|
*prev = timer;
|
||||||
+ OsReleaseSignals();
|
+ OsReleaseSignals();
|
||||||
@ -94,33 +88,30 @@ index 867cb04..236406e 100644
|
|||||||
OsTimerPtr *prev;
|
OsTimerPtr *prev;
|
||||||
|
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
for (prev = &timers; *prev; prev = &(*prev)->next)
|
for (prev = &timers; *prev; prev = &(*prev)->next) {
|
||||||
{
|
if (*prev == timer) {
|
||||||
if (*prev == timer)
|
DoTimer(timer, GetTimeInMillis(), prev);
|
||||||
{
|
- return TRUE;
|
||||||
DoTimer(timer, GetTimeInMillis(), prev);
|
+ rc = TRUE;
|
||||||
- return TRUE;
|
+ break;
|
||||||
+ rc = TRUE;
|
}
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
- return FALSE;
|
- return FALSE;
|
||||||
+ OsReleaseSignals();
|
+ OsReleaseSignals();
|
||||||
+ return rc;
|
+ return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
@@ -506,6 +518,7 @@ TimerCancel(OsTimerPtr timer)
|
@@ -474,12 +486,14 @@ TimerCancel(OsTimerPtr timer)
|
||||||
|
|
||||||
if (!timer)
|
if (!timer)
|
||||||
return;
|
return;
|
||||||
+ OsBlockSignals();
|
+ OsBlockSignals();
|
||||||
for (prev = &timers; *prev; prev = &(*prev)->next)
|
for (prev = &timers; *prev; prev = &(*prev)->next) {
|
||||||
{
|
if (*prev == timer) {
|
||||||
if (*prev == timer)
|
*prev = timer->next;
|
||||||
@@ -514,6 +527,7 @@ TimerCancel(OsTimerPtr timer)
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+ OsReleaseSignals();
|
+ OsReleaseSignals();
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
From a02009f81a8ee019b0642716eb68475c75eca5ec Mon Sep 17 00:00:00 2001
|
From 66a3b14e118e90db80f96fcab52af4df35bc2377 Mon Sep 17 00:00:00 2001
|
||||||
From: Adam Jackson <ajax@redhat.com>
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
Date: Mon, 10 Dec 2007 11:26:57 -0500
|
Date: Mon, 10 Dec 2007 11:26:57 -0500
|
||||||
Subject: [PATCH] Hack for proper MIT-SHM rejection for ssh-forwarded clients.
|
Subject: [PATCH] Hack for proper MIT-SHM rejection for ssh-forwarded clients.
|
||||||
|
|
||||||
---
|
---
|
||||||
Xext/shm.c | 16 ++++++++++++++++
|
Xext/shm.c | 16 ++++++++++++++++
|
||||||
1 files changed, 16 insertions(+), 0 deletions(-)
|
1 file changed, 16 insertions(+)
|
||||||
|
|
||||||
diff --git a/Xext/shm.c b/Xext/shm.c
|
diff --git a/Xext/shm.c b/Xext/shm.c
|
||||||
index 23afe6b..1e2f9f5 100644
|
index de48020..c011210 100644
|
||||||
--- a/Xext/shm.c
|
--- a/Xext/shm.c
|
||||||
+++ b/Xext/shm.c
|
+++ b/Xext/shm.c
|
||||||
@@ -325,8 +325,21 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
|
@@ -321,8 +321,21 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly)
|
||||||
mode_t mask;
|
mode_t mask;
|
||||||
int uidset = 0, gidset = 0;
|
int uidset = 0, gidset = 0;
|
||||||
LocalClientCredRec *lcc;
|
LocalClientCredRec *lcc;
|
||||||
+ Bool is_ssh = FALSE;
|
+ Bool is_ssh = FALSE;
|
||||||
|
|
||||||
if (GetLocalClientCreds(client, &lcc) != -1) {
|
if (GetLocalClientCreds(client, &lcc) != -1) {
|
||||||
+#ifdef linux
|
+#ifdef linux
|
||||||
+ if (lcc->fieldsSet & LCC_PID_SET) {
|
+ if (lcc->fieldsSet & LCC_PID_SET) {
|
||||||
@ -31,18 +31,18 @@ index 23afe6b..1e2f9f5 100644
|
|||||||
+ }
|
+ }
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
if (lcc->fieldsSet & LCC_UID_SET) {
|
if (lcc->fieldsSet & LCC_UID_SET) {
|
||||||
uid = lcc->euid;
|
uid = lcc->euid;
|
||||||
@@ -345,6 +358,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly)
|
@@ -342,6 +355,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly)
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
FreeLocalClientCreds(lcc);
|
FreeLocalClientCreds(lcc);
|
||||||
|
|
||||||
|
+ if (is_ssh)
|
||||||
|
+ return -1;
|
||||||
+
|
+
|
||||||
+ if (is_ssh)
|
if (uidset) {
|
||||||
+ return -1;
|
/* User id 0 always gets access */
|
||||||
|
if (uid == 0) {
|
||||||
if (uidset) {
|
|
||||||
/* User id 0 always gets access */
|
|
||||||
--
|
--
|
||||||
1.7.3.2
|
1.7.10.1
|
||||||
|
|
||||||
|
@ -1,20 +1,35 @@
|
|||||||
From 47d4a39c0c82d45b8e0eada36d14c233dbb1cff2 Mon Sep 17 00:00:00 2001
|
From 247319fe3750671cd962df2c12548affb0351775 Mon Sep 17 00:00:00 2001
|
||||||
From: Adam Jackson <ajax@redhat.com>
|
From: Chase Douglas <chase.douglas@canonical.com>
|
||||||
Date: Thu, 18 Jun 2009 16:56:41 +1000
|
Date: Wed, 4 Apr 2012 15:29:42 -0700
|
||||||
Subject: [PATCH] displayfd hack
|
Subject: [PATCH 3/7] os: Add -displayfd option
|
||||||
|
|
||||||
|
This option specifies a file descriptor in the launching process. X
|
||||||
|
will scan for an available display number and write that number back to
|
||||||
|
the launching process, at the same time as SIGUSR1 generation. This
|
||||||
|
means display managers don't need to guess at available display numbers.
|
||||||
|
As a consequence, if X fails to start when using -displayfd, it's not
|
||||||
|
because the display was in use, so there's no point in retrying the X
|
||||||
|
launch on a higher display number.
|
||||||
|
|
||||||
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
|
||||||
|
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
||||||
|
Tested-by: Julien Cristau <jcristau@debian.org>
|
||||||
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
---
|
---
|
||||||
dix/globals.c | 1 +
|
dix/globals.c | 1 +
|
||||||
include/opaque.h | 1 +
|
include/opaque.h | 1 +
|
||||||
os/connection.c | 73 +++++++++++++++++++++++++++++++++++++-----------------
|
man/Xserver.man | 7 ++++++
|
||||||
os/utils.c | 11 ++++++++
|
os/connection.c | 68 ++++++++++++++++++++++++++++++++++++++----------------
|
||||||
4 files changed, 63 insertions(+), 23 deletions(-)
|
os/utils.c | 9 ++++++++
|
||||||
|
5 files changed, 66 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
diff --git a/dix/globals.c b/dix/globals.c
|
diff --git a/dix/globals.c b/dix/globals.c
|
||||||
index 0a6b170..0ee83c0 100644
|
index c0cae15..db113ca 100644
|
||||||
--- a/dix/globals.c
|
--- a/dix/globals.c
|
||||||
+++ b/dix/globals.c
|
+++ b/dix/globals.c
|
||||||
@@ -126,6 +126,7 @@ int defaultColorVisualClass = -1;
|
@@ -128,6 +128,7 @@ int defaultColorVisualClass = -1;
|
||||||
int monitorResolution = 0;
|
int monitorResolution = 0;
|
||||||
|
|
||||||
char *display;
|
char *display;
|
||||||
@ -23,7 +38,7 @@ index 0a6b170..0ee83c0 100644
|
|||||||
|
|
||||||
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
|
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
|
||||||
diff --git a/include/opaque.h b/include/opaque.h
|
diff --git a/include/opaque.h b/include/opaque.h
|
||||||
index 5c70717..f23203f 100644
|
index 9ca408a..b76ab6e 100644
|
||||||
--- a/include/opaque.h
|
--- a/include/opaque.h
|
||||||
+++ b/include/opaque.h
|
+++ b/include/opaque.h
|
||||||
@@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures;
|
@@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures;
|
||||||
@ -34,27 +49,48 @@ index 5c70717..f23203f 100644
|
|||||||
|
|
||||||
extern _X_EXPORT int defaultBackingStore;
|
extern _X_EXPORT int defaultBackingStore;
|
||||||
extern _X_EXPORT Bool disableBackingStore;
|
extern _X_EXPORT Bool disableBackingStore;
|
||||||
|
diff --git a/man/Xserver.man b/man/Xserver.man
|
||||||
|
index 0cd9b94..8d243d6 100644
|
||||||
|
--- a/man/Xserver.man
|
||||||
|
+++ b/man/Xserver.man
|
||||||
|
@@ -127,6 +127,13 @@ Not obeyed by all servers.
|
||||||
|
.B \-core
|
||||||
|
causes the server to generate a core dump on fatal errors.
|
||||||
|
.TP 8
|
||||||
|
+.B \-displayfd \fIfd\fP
|
||||||
|
+specifies a file descriptor in the launching process. Rather than specify
|
||||||
|
+a display number, the X server will attempt to listen on successively higher
|
||||||
|
+display numbers, and upon finding a free one, will write the port number back
|
||||||
|
+on this file descriptor as a newline-terminated string. The \-pn option is
|
||||||
|
+ignored when using \-displayfd.
|
||||||
|
+.TP 8
|
||||||
|
.B \-deferglyphs \fIwhichfonts\fP
|
||||||
|
specifies the types of fonts for which the server should attempt to use
|
||||||
|
deferred glyph loading. \fIwhichfonts\fP can be all (all fonts),
|
||||||
diff --git a/os/connection.c b/os/connection.c
|
diff --git a/os/connection.c b/os/connection.c
|
||||||
index 8a677a7..fea227a 100644
|
index 1099752..039942f 100644
|
||||||
--- a/os/connection.c
|
--- a/os/connection.c
|
||||||
+++ b/os/connection.c
|
+++ b/os/connection.c
|
||||||
@@ -145,6 +145,7 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
|
@@ -142,6 +142,7 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
|
||||||
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
|
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
|
||||||
Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
|
Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
|
||||||
equivalent) will send SIGCONT back. */
|
equivalent) will send SIGCONT back. */
|
||||||
+static char dynamic_display[7];
|
+static char dynamic_display[7]; /* display name */
|
||||||
Bool PartialNetwork; /* continue even if unable to bind all addrs */
|
Bool PartialNetwork; /* continue even if unable to bind all addrs */
|
||||||
static Pid_t ParentProcess;
|
static Pid_t ParentProcess;
|
||||||
|
|
||||||
@@ -356,11 +357,26 @@ NotifyParentProcess(void)
|
@@ -350,6 +351,10 @@ void
|
||||||
kill (ParentProcess, SIGUSR1);
|
NotifyParentProcess(void)
|
||||||
}
|
{
|
||||||
}
|
#if !defined(WIN32)
|
||||||
+ if (dynamic_display[0])
|
+ if (dynamic_display[0]) {
|
||||||
+ write(displayfd, dynamic_display, strlen(dynamic_display));
|
+ write(displayfd, dynamic_display, strlen(dynamic_display));
|
||||||
+
|
+ close(displayfd);
|
||||||
if (RunFromSigStopParent)
|
+ }
|
||||||
raise (SIGSTOP);
|
if (RunFromSmartParent) {
|
||||||
|
if (ParentProcess > 1) {
|
||||||
|
kill(ParentProcess, SIGUSR1);
|
||||||
|
@@ -360,6 +365,18 @@ NotifyParentProcess(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,113 +99,105 @@ index 8a677a7..fea227a 100644
|
|||||||
+{
|
+{
|
||||||
+ char port[20];
|
+ char port[20];
|
||||||
+
|
+
|
||||||
+ snprintf (port, sizeof(port), "%d", num);
|
+ snprintf(port, sizeof(port), "%d", num);
|
||||||
+
|
+
|
||||||
+ return _XSERVTransMakeAllCOTSServerListeners(port, partial,
|
+ return (_XSERVTransMakeAllCOTSServerListeners(port, partial,
|
||||||
+ &ListenTransCount,
|
+ &ListenTransCount,
|
||||||
+ &ListenTransConns);
|
+ &ListenTransConns) >= 0);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
/*****************
|
/*****************
|
||||||
* CreateWellKnownSockets
|
* CreateWellKnownSockets
|
||||||
* At initialization, create the sockets to listen on for new clients.
|
* At initialization, create the sockets to listen on for new clients.
|
||||||
@@ -371,7 +387,6 @@ CreateWellKnownSockets(void)
|
@@ -370,7 +387,6 @@ CreateWellKnownSockets(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int partial;
|
int partial;
|
||||||
- char port[20];
|
- char port[20];
|
||||||
|
|
||||||
FD_ZERO(&AllSockets);
|
FD_ZERO(&AllSockets);
|
||||||
FD_ZERO(&AllClients);
|
FD_ZERO(&AllClients);
|
||||||
@@ -386,32 +401,44 @@ CreateWellKnownSockets(void)
|
@@ -386,29 +402,41 @@ CreateWellKnownSockets(void)
|
||||||
|
|
||||||
FD_ZERO (&WellKnownConnections);
|
FD_ZERO(&WellKnownConnections);
|
||||||
|
|
||||||
- snprintf (port, sizeof(port), "%d", atoi (display));
|
- snprintf(port, sizeof(port), "%d", atoi(display));
|
||||||
-
|
-
|
||||||
- if ((_XSERVTransMakeAllCOTSServerListeners (port, &partial,
|
- if ((_XSERVTransMakeAllCOTSServerListeners(port, &partial,
|
||||||
- &ListenTransCount, &ListenTransConns) >= 0) &&
|
- &ListenTransCount,
|
||||||
- (ListenTransCount >= 1))
|
- &ListenTransConns) >= 0) &&
|
||||||
+ if (display)
|
- (ListenTransCount >= 1)) {
|
||||||
{
|
- if (!PartialNetwork && partial) {
|
||||||
- if (!PartialNetwork && partial)
|
- FatalError("Failed to establish all listening sockets");
|
||||||
- {
|
+ /* display is initialized to "0" by main(). It is then set to the display
|
||||||
- FatalError ("Failed to establish all listening sockets");
|
+ * number if specified on the command line, or to NULL when the -displayfd
|
||||||
- }
|
+ * option is used. */
|
||||||
- else
|
+ if (display) {
|
||||||
+ if (TryCreateSocket(atoi(display), &partial) &&
|
+ if (TryCreateSocket(atoi(display), &partial) &&
|
||||||
+ (ListenTransCount >= 1))
|
+ ListenTransCount >= 1)
|
||||||
+ if (!PartialNetwork && partial)
|
+ if (!PartialNetwork && partial)
|
||||||
+ FatalError ("Failed to establish all listening sockets");
|
+ FatalError ("Failed to establish all listening sockets");
|
||||||
+ }
|
+ }
|
||||||
+ else /* -displayfd */
|
+ else { /* -displayfd */
|
||||||
+ {
|
+ Bool found = 0;
|
||||||
+ Bool found = 0;
|
+ for (i = 0; i < 65535 - X_TCP_PORT; i++) {
|
||||||
+ for (i = 0; i < 65535 - 1024; i++)
|
+ if (TryCreateSocket(i, &partial) && !partial) {
|
||||||
{
|
+ found = 1;
|
||||||
- ListenTransFds = malloc(ListenTransCount * sizeof (int));
|
+ break;
|
||||||
-
|
+ }
|
||||||
- for (i = 0; i < ListenTransCount; i++)
|
+ else
|
||||||
+ if (!TryCreateSocket(i, &partial) && !partial)
|
+ CloseWellKnownConnections();
|
||||||
{
|
}
|
||||||
- int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]);
|
- else {
|
||||||
-
|
- ListenTransFds = malloc(ListenTransCount * sizeof(int));
|
||||||
- ListenTransFds[i] = fd;
|
+ if (!found)
|
||||||
- FD_SET (fd, &WellKnownConnections);
|
+ FatalError("Failed to find a socket to listen on");
|
||||||
-
|
+ snprintf(dynamic_display, sizeof(dynamic_display), "%d", i);
|
||||||
- if (!_XSERVTransIsLocal (ListenTransConns[i]))
|
+ display = dynamic_display;
|
||||||
- {
|
|
||||||
- DefineSelf (fd);
|
|
||||||
- }
|
|
||||||
+ found = 1;
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
+ else
|
|
||||||
+ CloseWellKnownConnections();
|
|
||||||
+ }
|
|
||||||
+ if (!found)
|
|
||||||
+ FatalError("Failed to find a socket to listen on");
|
|
||||||
+ sprintf(dynamic_display, "%d\n", i);
|
|
||||||
+ display = dynamic_display;
|
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
|
- for (i = 0; i < ListenTransCount; i++) {
|
||||||
|
- int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
|
||||||
|
+ ListenTransFds = malloc(ListenTransCount * sizeof (int));
|
||||||
|
|
||||||
|
- ListenTransFds[i] = fd;
|
||||||
|
- FD_SET(fd, &WellKnownConnections);
|
||||||
|
+ for (i = 0; i < ListenTransCount; i++) {
|
||||||
|
+ int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
|
||||||
|
|
||||||
|
- if (!_XSERVTransIsLocal(ListenTransConns[i])) {
|
||||||
|
- DefineSelf(fd);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ ListenTransFds[i] = fd;
|
||||||
|
+ FD_SET(fd, &WellKnownConnections);
|
||||||
+
|
+
|
||||||
+ ListenTransFds = xalloc (ListenTransCount * sizeof (int));
|
+ if (!_XSERVTransIsLocal(ListenTransConns[i]))
|
||||||
+
|
+ DefineSelf (fd);
|
||||||
+ for (i = 0; i < ListenTransCount; i++)
|
|
||||||
+ {
|
|
||||||
+ int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]);
|
|
||||||
+
|
|
||||||
+ ListenTransFds[i] = fd;
|
|
||||||
+ FD_SET (fd, &WellKnownConnections);
|
|
||||||
+
|
|
||||||
+ if (!_XSERVTransIsLocal (ListenTransConns[i]))
|
|
||||||
+ {
|
|
||||||
+ DefineSelf (fd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!XFD_ANYSET(&WellKnownConnections))
|
||||||
diff --git a/os/utils.c b/os/utils.c
|
diff --git a/os/utils.c b/os/utils.c
|
||||||
index 6461ed5..17860df 100644
|
index 30592d2..3a1ef93 100644
|
||||||
--- a/os/utils.c
|
--- a/os/utils.c
|
||||||
+++ b/os/utils.c
|
+++ b/os/utils.c
|
||||||
@@ -661,6 +661,17 @@ ProcessCommandLine(int argc, char *argv[])
|
@@ -659,6 +659,15 @@ ProcessCommandLine(int argc, char *argv[])
|
||||||
else
|
else
|
||||||
UseMsg();
|
UseMsg();
|
||||||
}
|
}
|
||||||
+ else if (strcmp(argv[i], "-displayfd") == 0)
|
+ else if (strcmp(argv[i], "-displayfd") == 0) {
|
||||||
+ {
|
+ if (++i < argc) {
|
||||||
+ if (++i < argc)
|
+ displayfd = atoi(argv[i]);
|
||||||
+ {
|
+ display = NULL;
|
||||||
+ displayfd = atoi(argv[i]);
|
+ nolock = TRUE;
|
||||||
+ display = NULL;
|
+ }
|
||||||
+ nolock = TRUE;
|
+ else
|
||||||
+ }
|
+ UseMsg();
|
||||||
+ else
|
+ }
|
||||||
+ UseMsg();
|
|
||||||
+ }
|
|
||||||
#ifdef DPMSExtension
|
#ifdef DPMSExtension
|
||||||
else if ( strcmp( argv[i], "dpms") == 0)
|
else if (strcmp(argv[i], "dpms") == 0)
|
||||||
/* ignored for compatibility */ ;
|
/* ignored for compatibility */ ;
|
||||||
--
|
--
|
||||||
1.7.7.4
|
1.7.10.1
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
From 392ce7dc5062416a8cf1c9a66e0dce1677f46804 Mon Sep 17 00:00:00 2001
|
From 0002cde5312e785529b2901d7f8a82d5623e4ca7 Mon Sep 17 00:00:00 2001
|
||||||
From: Adam Jackson <ajax@redhat.com>
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
Date: Wed, 9 Nov 2011 11:52:06 +1000
|
Date: Wed, 9 Nov 2011 11:52:06 +1000
|
||||||
Subject: [PATCH] Don't build the ACPI code.
|
Subject: [PATCH 2/7] Don't build the ACPI code.
|
||||||
|
|
||||||
No good can come of this.
|
No good can come of this.
|
||||||
---
|
---
|
||||||
configure.ac | 1 -
|
configure.ac | 1 -
|
||||||
1 files changed, 0 insertions(+), 1 deletions(-)
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index 63d59f9..6683005 100644
|
index a12783c..54f4464 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -1624,7 +1624,6 @@ if test "x$XORG" = xyes; then
|
@@ -1620,7 +1620,6 @@ if test "x$XORG" = xyes; then
|
||||||
linux_alpha=yes
|
linux_alpha=yes
|
||||||
;;
|
;;
|
||||||
i*86|amd64*|x86_64*|ia64*)
|
i*86|amd64*|x86_64*|ia64*)
|
||||||
@ -21,5 +21,5 @@ index 63d59f9..6683005 100644
|
|||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
--
|
--
|
||||||
1.7.7
|
1.7.10.1
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
From 12aa6574fd87ec28186a75256a5111e9703d932e Mon Sep 17 00:00:00 2001
|
From d91c3a11db2657e33087464463c9aa44aaf5c8b8 Mon Sep 17 00:00:00 2001
|
||||||
From: Adam Jackson <ajax@redhat.com>
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
Date: Tue, 28 Jul 2009 11:07:13 -0400
|
Date: Tue, 28 Jul 2009 11:07:13 -0400
|
||||||
Subject: [PATCH 4/9] RANDR: right-of placement by default
|
Subject: [PATCH 4/7] RANDR: right-of placement by default
|
||||||
|
|
||||||
[Enhanced to add a new prefer clone option for drivers. This
|
[Enhanced to add a new prefer clone option for drivers. This
|
||||||
allows for servers like RN50 where two heads are disjoint. - airlied]
|
allows for servers like RN50 where two heads are disjoint. - airlied]
|
||||||
---
|
---
|
||||||
hw/xfree86/common/xf86str.h | 9 ++++-
|
hw/xfree86/common/xf86str.h | 8 ++++-
|
||||||
hw/xfree86/modes/xf86Crtc.c | 74 ++++++++++++++++++++++++++++++++++++++----
|
hw/xfree86/modes/xf86Crtc.c | 76 ++++++++++++++++++++++++++++++++++++++-----
|
||||||
2 files changed, 74 insertions(+), 9 deletions(-)
|
2 files changed, 75 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
|
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
|
||||||
index 0493dc5..d66e373 100644
|
index 6294845..7d1fbab 100644
|
||||||
--- a/hw/xfree86/common/xf86str.h
|
--- a/hw/xfree86/common/xf86str.h
|
||||||
+++ b/hw/xfree86/common/xf86str.h
|
+++ b/hw/xfree86/common/xf86str.h
|
||||||
@@ -496,10 +496,13 @@ typedef struct _confdrirec {
|
@@ -497,10 +497,13 @@ typedef struct _confdrirec {
|
||||||
} confDRIRec, *confDRIPtr;
|
} confDRIRec, *confDRIPtr;
|
||||||
|
|
||||||
/* These values should be adjusted when new fields are added to ScrnInfoRec */
|
/* These values should be adjusted when new fields are added to ScrnInfoRec */
|
||||||
@ -26,20 +26,12 @@ index 0493dc5..d66e373 100644
|
|||||||
+/* let clients know they can use this */
|
+/* let clients know they can use this */
|
||||||
+#define XF86_SCRN_HAS_PREFER_CLONE 1
|
+#define XF86_SCRN_HAS_PREFER_CLONE 1
|
||||||
+
|
+
|
||||||
typedef pointer (*funcPointer)(void);
|
typedef pointer (*funcPointer) (void);
|
||||||
|
|
||||||
/* flags for depth 24 pixmap options */
|
/* flags for depth 24 pixmap options */
|
||||||
@@ -659,7 +662,6 @@ typedef void xf86ModeSetProc (ScrnInfoPtr);
|
@@ -758,6 +761,9 @@ typedef struct _ScrnInfoRec {
|
||||||
* are to be dependent on compile-time defines.
|
ClockRangePtr clockRanges;
|
||||||
*/
|
int adjustFlags;
|
||||||
|
|
||||||
-
|
|
||||||
typedef struct _ScrnInfoRec {
|
|
||||||
int driverVersion;
|
|
||||||
char * driverName; /* canonical name used in */
|
|
||||||
@@ -761,6 +763,9 @@ typedef struct _ScrnInfoRec {
|
|
||||||
ClockRangePtr clockRanges;
|
|
||||||
int adjustFlags;
|
|
||||||
|
|
||||||
+ /* initial rightof support disable */
|
+ /* initial rightof support disable */
|
||||||
+ int preferClone;
|
+ int preferClone;
|
||||||
@ -48,26 +40,26 @@ index 0493dc5..d66e373 100644
|
|||||||
* These can be used when the minor ABI version is incremented.
|
* These can be used when the minor ABI version is incremented.
|
||||||
* The NUM_* parameters must be reduced appropriately to keep the
|
* The NUM_* parameters must be reduced appropriately to keep the
|
||||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||||
index c2814d4..b25876f 100644
|
index 6d5e92f..7d560f4 100644
|
||||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||||
@@ -1139,6 +1139,15 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
|
@@ -1114,6 +1114,15 @@ xf86InitialOutputPositions(ScrnInfoPtr scrn, DisplayModePtr * modes)
|
||||||
int o;
|
int o;
|
||||||
int min_x, min_y;
|
int min_x, min_y;
|
||||||
|
|
||||||
+ /* check for initial right-of heuristic */
|
+ /* check for initial right-of heuristic */
|
||||||
+ for (o = 0; o < config->num_output; o++)
|
+ for (o = 0; o < config->num_output; o++)
|
||||||
+ {
|
+ {
|
||||||
+ xf86OutputPtr output = config->output[o];
|
+ xf86OutputPtr output = config->output[o];
|
||||||
+
|
+
|
||||||
+ if (output->initial_x || output->initial_y)
|
+ if (output->initial_x || output->initial_y)
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
for (o = 0; o < config->num_output; o++)
|
for (o = 0; o < config->num_output; o++) {
|
||||||
{
|
xf86OutputPtr output = config->output[o];
|
||||||
xf86OutputPtr output = config->output[o];
|
|
||||||
@@ -2030,6 +2039,57 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
|
@@ -1982,6 +1991,57 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,40 +75,40 @@ index c2814d4..b25876f 100644
|
|||||||
+
|
+
|
||||||
+static Bool
|
+static Bool
|
||||||
+xf86TargetRightOf(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
+xf86TargetRightOf(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||||
+ DisplayModePtr *modes, Bool *enabled,
|
+ DisplayModePtr *modes, Bool *enabled,
|
||||||
+ int width, int height)
|
+ int width, int height)
|
||||||
+{
|
+{
|
||||||
+ int o;
|
+ int o;
|
||||||
+ int w = 0;
|
+ int w = 0;
|
||||||
+
|
+
|
||||||
+ if (scrn->preferClone)
|
+ if (scrn->preferClone)
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+
|
+
|
||||||
+ if (numEnabledOutputs(config, enabled) < 2)
|
+ if (numEnabledOutputs(config, enabled) < 2)
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+
|
+
|
||||||
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
||||||
+ DisplayModePtr mode =
|
+ DisplayModePtr mode =
|
||||||
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
||||||
+
|
+
|
||||||
+ if (!mode)
|
+ if (!mode)
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+
|
+
|
||||||
+ w += mode->HDisplay;
|
+ w += mode->HDisplay;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (w > width)
|
+ if (w > width)
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+
|
+
|
||||||
+ w = 0;
|
+ w = 0;
|
||||||
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
+ for (o = -1; nextEnabledOutput(config, enabled, &o); ) {
|
||||||
+ DisplayModePtr mode =
|
+ DisplayModePtr mode =
|
||||||
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
+ xf86OutputHasPreferredMode(config->output[o], width, height);
|
||||||
+
|
+
|
||||||
+ config->output[o]->initial_x = w;
|
+ config->output[o]->initial_x = w;
|
||||||
+ w += mode->HDisplay;
|
+ w += mode->HDisplay;
|
||||||
+
|
+
|
||||||
+ modes[o] = mode;
|
+ modes[o] = mode;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
@ -124,44 +116,46 @@ index c2814d4..b25876f 100644
|
|||||||
+
|
+
|
||||||
static Bool
|
static Bool
|
||||||
xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||||
DisplayModePtr *modes, Bool *enabled,
|
DisplayModePtr * modes, Bool *enabled,
|
||||||
@@ -2087,13 +2147,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
@@ -2058,13 +2118,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||||
* biggest mode for its aspect ratio, assuming one exists.
|
|
||||||
*/
|
*/
|
||||||
if (!ret) do {
|
if (!ret)
|
||||||
- int i = 0;
|
do {
|
||||||
float aspect = 0.0;
|
- int i = 0;
|
||||||
|
float aspect = 0.0;
|
||||||
|
|
||||||
- /* count the number of enabled outputs */
|
- /* count the number of enabled outputs */
|
||||||
- for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ;
|
- for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++);
|
||||||
-
|
-
|
||||||
- if (i != 1)
|
- if (i != 1)
|
||||||
+ if (numEnabledOutputs(config, enabled) != 1)
|
+ if (numEnabledOutputs(config, enabled) != 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
p = -1;
|
p = -1;
|
||||||
@@ -2388,6 +2444,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
@@ -2365,6 +2421,8 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||||
} else {
|
else {
|
||||||
if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
|
if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
|
||||||
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
|
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
|
||||||
+ else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height))
|
+ else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height))
|
||||||
+ xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n");
|
+ xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n");
|
||||||
else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
|
else if (xf86TargetPreferred
|
||||||
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
|
(scrn, config, modes, enabled, width, height))
|
||||||
else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
|
||||||
@@ -2405,8 +2463,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
@@ -2384,9 +2442,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||||
config->output[o]->name);
|
"Output %s enabled but has no modes\n",
|
||||||
else
|
config->output[o]->name);
|
||||||
xf86DrvMsg (scrn->scrnIndex, X_INFO,
|
else
|
||||||
- "Output %s using initial mode %s\n",
|
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
|
||||||
- config->output[o]->name, modes[o]->name);
|
- "Output %s using initial mode %s\n",
|
||||||
+ "Output %s using initial mode %s +%d+%d\n",
|
- config->output[o]->name, modes[o]->name);
|
||||||
+ config->output[o]->name, modes[o]->name,
|
+ xf86DrvMsg (scrn->scrnIndex, X_INFO,
|
||||||
|
+ "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_x,
|
||||||
+ config->output[o]->initial_y);
|
+ config->output[o]->initial_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
--
|
--
|
||||||
1.7.4.4
|
1.7.10.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user