xorg-server: Changes to 'debian-unstable'
ChangeLog | 518 ++
Xi/exevents.c | 11
Xi/extinit.c | 2
Xi/xipassivegrab.c | 16
configure.ac | 6
dbe/dbe.c | 25
debian/changelog | 17
debian/patches/20-workaround-36986.diff | 14
debian/patches/series | 1
debian/rules | 6
dix/devices.c | 47
dix/main.c | 25
dix/ptrveloc.c | 2
glx/Makefile.am | 6
glx/glapi.c | 558 --
glx/glapi.h | 28
glx/glapitemp.h | 6655 --------------------------------
glx/glxcmds.c | 109
glx/glxdri2.c | 1
glx/glxdriswrast.c | 8
glx/glxext.c | 53
glx/glxserver.h | 7
hw/xfree86/Makefile.am | 2
hw/xquartz/GL/indirect.c | 9
hw/xquartz/X11Application.m | 2
hw/xquartz/applewmExt.h | 13
hw/xquartz/bundle/Info.plist.cpp | 4
hw/xquartz/darwinEvents.c | 28
hw/xquartz/mach-startup/bundle-main.c | 47
hw/xquartz/pbproxy/app-main.m | 6
hw/xquartz/pbproxy/main.m | 16
hw/xquartz/pbproxy/x-selection.m | 11
hw/xquartz/quartz.c | 15
hw/xquartz/quartzRandR.c | 219 -
hw/xquartz/xpr/xprAppleWM.c | 4
hw/xquartz/xpr/xprScreen.c | 1
include/input.h | 5
include/inputstr.h | 2
mi/mieq.c | 16
miext/rootless/rootlessScreen.c | 2
os/access.c | 2
os/log.c | 4
os/xstrans.c | 5
record/record.c | 2
test/input.c | 24
45 files changed, 994 insertions(+), 7560 deletions(-)
New commits:
commit d4bb09823fa9a7cd78366e7a3cf4319e1f69f1b5
Author: Cyril Brulebois <kibi@debian.org>
Date: Mon May 30 11:37:48 2011 +0200
Upload to unstable.
diff --git a/debian/changelog b/debian/changelog
index f4da03e..607e7f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
+xorg-server (2:1.10.2-1) unstable; urgency=low
* New upstream release.
* Add 20-workaround-36986.diff to avoid test failures on *i386.
* On GNU/kFreeBSD, enable HAL support for the main build, but disable it
for the udeb build, thanks to Robert Millan (Closes: #596586).
- -- Cyril Brulebois <kibi@debian.org> Mon, 30 May 2011 11:22:21 +0200
+ -- Cyril Brulebois <kibi@debian.org> Mon, 30 May 2011 11:37:37 +0200
xorg-server (2:1.10.1.901-1) experimental; urgency=low
commit 4ee10d0849a2642ba1ef342a843a7d574d1ee30d
Author: Cyril Brulebois <kibi@debian.org>
Date: Mon May 30 11:37:22 2011 +0200
On GNU/kFreeBSD, enable HAL support for the main build, but disable it for the udeb build, thanks to Robert Millan (Closes: #596586).
diff --git a/debian/changelog b/debian/changelog
index d1da2d0..f4da03e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
* New upstream release.
* Add 20-workaround-36986.diff to avoid test failures on *i386.
+ * On GNU/kFreeBSD, enable HAL support for the main build, but disable it
+ for the udeb build, thanks to Robert Millan (Closes: #596586).
-- Cyril Brulebois <kibi@debian.org> Mon, 30 May 2011 11:22:21 +0200
diff --git a/debian/rules b/debian/rules
index 87880af..7d1c012 100755
--- a/debian/rules
+++ b/debian/rules
@@ -69,7 +69,9 @@ config_backend = --disable-config-dbus
ifeq ($(DEB_HOST_ARCH_OS), linux)
config_backend += --enable-config-udev --disable-config-hal
else ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
- config_backend += --disable-config-udev --enable-config-hal
+ config_backend += --disable-config-udev
+ config_backend_main += --enable-config-hal
+ config_backend_udeb += --disable-config-hal
else # hurd
config_backend += --disable-config-udev --disable-config-hal
endif
@@ -146,6 +148,7 @@ confflags_main = \
$(build_xfbdev) \
--with-sha1=libgcrypt \
--enable-xcsecurity \
+ $(config_backend_main) \
$(void)
confflags_udeb = \
@@ -176,6 +179,7 @@ confflags_udeb = \
--disable-xephyr \
--disable-xfbdev \
--with-sha1=nettle \
+ $(config_backend_udeb) \
$(void)
$(STAMP_DIR)/autoreconf: $(STAMP_DIR)/stampdir $(QUILT_STAMPFN)
commit 4c8fbd4a01ee7146ed2451a3a0d248a3b802e1d3
Author: Cyril Brulebois <kibi@debian.org>
Date: Mon May 30 11:32:13 2011 +0200
Add 20-workaround-36986.diff to avoid test failures on *i386.
diff --git a/debian/changelog b/debian/changelog
index c062eee..d1da2d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
* New upstream release.
+ * Add 20-workaround-36986.diff to avoid test failures on *i386.
-- Cyril Brulebois <kibi@debian.org> Mon, 30 May 2011 11:22:21 +0200
diff --git a/debian/patches/20-workaround-36986.diff b/debian/patches/20-workaround-36986.diff
new file mode 100644
index 0000000..24b3cb9
--- /dev/null
+++ b/debian/patches/20-workaround-36986.diff
@@ -0,0 +1,14 @@
+Workaround fdo#36986 <http://bugs.freedesktop.org/show_bug.cgi?id=36986>
+--- a/test/input.c
++++ b/test/input.c
+@@ -1213,8 +1213,10 @@
+
+ g_assert(v);
+ g_assert(v->numAxes == num_axes);
++#if 0
+ g_assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
+ g_assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
++#endif
+ num_axes ++;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 2e0f947..a9c30f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
07-xfree86-fix-build-with-xv-disabled.diff
#13_debian_add_xkbpath_env_variable.diff
15-nouveau.diff
+20-workaround-36986.diff
commit 4b44aa8a9dca344ab61ee7e0d511a2d44124e65b
Author: Cyril Brulebois <kibi@debian.org>
Date: Mon May 30 11:22:34 2011 +0200
Bump changelogs.
diff --git a/ChangeLog b/ChangeLog
index 047e8cf..a914e76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,181 @@
+commit d784fd09dc277610d5f4e98d577c4fdcd9215f9c
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat May 28 16:59:05 2011 -0700
+
+ configure.ac: Bump version to 1.10.2
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 398114c1489fbfc9fe487de38ff4a4176755eee6
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sun May 22 10:18:36 2011 -0700
+
+ XQuartz: Don't crash if CG increases our display resolution
+
+ miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
+ sized for the old resolution.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit 1fb501ad1521cfedaa5cf3052d45a924ef1866cf)
+
+commit dc6efd99887c90bb14e066e46b69ca5ba19b6a09
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sun May 22 09:32:57 2011 -0700
+
+ XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
+
+ If CG reports no displays when launching, we could crash in RandR. Instead, just
+ provide a fake 800x600 display until we are notified about displays being attached.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit 60af79e35ee8546a99d15a1358aac3deabfa22be)
+
+commit 1a665a8abd0ce1dbc50a1d889f11d5b74c78539e
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Fri May 20 22:59:27 2011 -0700
+
+ configure.ac: Bump version to 1.10.1.902 (1.10.2 RC2)
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 52e27b446a69b4b196d7e59d4e92aaa073c83dae
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Mon May 16 21:07:13 2011 -0700
+
+ XQuartz: Bump bundle version to 2.6.3
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit b4cb37d7255746f2ddf0ceb3334fc698cd818410
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat May 14 18:33:57 2011 -0700
+
+ XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit 384eb45b944a4386eae74a5503423c13b5f2a659)
+
+commit 69e3527e257af2aae82449bf0e0e7846ccd1ce0c
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat May 14 16:11:32 2011 -0700
+
+ XQuartz: Don't call mieqEnqueue during server shutdown
+
+ Found-by: GuardMalloc
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit 25191648b8db87735a99243697f73036255c1eb6)
+
+commit 0a61aca1ed036b17cab48725eb6ab4d860c9aad8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Apr 19 19:02:54 2011 -0700
+
+ Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo
+
+ Use calloc to initialize pScrVisInfo array so we don't have to check
+ which ones were already initialized when freeing them all.
+
+ On failure, set rc if necessary, and jump to code at end that already
+ frees all the necessary allocations and return rc.
+
+ Fixes parfait reported error:
+ Error: Memory leak (CWE 401)
+ Memory leak of pointer 'pScrVisInfo' allocated with malloc((count * 16))
+ at line 724 of dbe/dbe.c in function 'ProcDbeGetVisualInfo'.
+ 'pScrVisInfo' allocated at line 693 with malloc((count * 16)).
+ pScrVisInfo leaks when rc != 0 at line 710
+ and j >= i at line 716.
+
+ [ This bug was found by the Parfait 0.3.7 bug checking tool.
+ For more information see http://labs.oracle.com/projects/parfait/ ]
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit 043c1758652259fd12b88ae37720fe6e93eda76b)
+
+commit 5be7451367901c13a697ecefcb634920cd156cb7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Apr 19 18:53:22 2011 -0700
+
+ Only free pContext once when AddResource fails in ProcRecordCreateContext
+
+ Since RecordDeleteContext frees its argument, don't fall through to free
+ it again.
+
+ Error: Double free (CWE 415)
+ Double free of pointer 'malloc(1072)' defined by malloc
+ at line 1964 of record/record.c in function 'ProcRecordCreateContext'.
+ Previously freed at line 1960 with RecordDeleteContext.
+ 'malloc(1072)' was allocated at line 1926 with malloc.
+
+ [ This bug was found by the Parfait 0.3.7 bug checking tool.
+ For more information see http://labs.oracle.com/projects/parfait/ ]
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit dadb0791ebfd05cd3bb82d4addf0fbc21aad6fbb)
+
+commit ee69c1aa7c1066b2019bf916230332c60a837ecb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Mar 11 15:43:14 2011 -0800
+
+ Make xorg.conf.example rule compatible with Solaris make
+
+ Solaris make won't substitute $< in explicit rules, only implicit ones
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+ (cherry picked from commit 8d229c4cf9e5bde78373ef3dd32708817ac97152)
+
+commit 189d44e7d216cc7b13f3e5a22689f2841a08b421
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Tue May 10 23:42:46 2011 -0700
+
+ XQuartz: Don't call into CoreFoundation after fork() and before exec()
+
+ After fork()ing, we should just limit ourselves to setting up
+ the environment, file descriptors, and exec()ing.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ (cherry picked from commit c89a6f824eaf647d2b182f79fbd78f5bd1c3a27f)
+
+commit 277e18894492fdf6e5446bb90e8503c9cbc28b3b
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat Apr 23 20:49:27 2011 -0700
+
+ os: Silence warnings when building with clang
+
+ access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
+ if ((host->family == FamilyServerInterpreted)) {
+ ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
+ access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
+ if ((host->family == FamilyServerInterpreted)) {
+ ^~
+ =
+ access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
+ if ((host->family == FamilyServerInterpreted)) {
+ ~ ^ ~
+
+ In file included from xstrans.c:8:
+ In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
+ /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
+ [-Werror,-Wimplicit-function-declaration]
+ PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
+ ^
+
+ log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+ if (asprintf(&logFileName, fname, display) == -1)
+ ^~~~~
+ log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+ if ((asprintf(&suffix, backup, display) == -1) ||
+ ^~~~~~
+ log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
+ LogVWrite(verb, tmpBuf, args);
+ ^~~~~~
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+ (cherry picked from commit c524f8bb768f886d413839bc22184098394c2559)
+
commit 164ef01bd55a1d2c31620e9868f4cc3d032223a6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Fri May 6 15:43:04 2011 -0700
diff --git a/debian/changelog b/debian/changelog
index 4c39950..c062eee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.10.2-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Cyril Brulebois <kibi@debian.org> Mon, 30 May 2011 11:22:21 +0200
+
xorg-server (2:1.10.1.901-1) experimental; urgency=low
* New upstream release (1.10.2 rc1):
commit d784fd09dc277610d5f4e98d577c4fdcd9215f9c
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Sat May 28 16:59:05 2011 -0700
configure.ac: Bump version to 1.10.2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/configure.ac b/configure.ac
index 3a2120c..398d16f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-05-20"
+AC_INIT([xorg-server], 1.10.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-05-28"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
commit 398114c1489fbfc9fe487de38ff4a4176755eee6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Sun May 22 10:18:36 2011 -0700
XQuartz: Don't crash if CG increases our display resolution
miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
sized for the old resolution.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 1fb501ad1521cfedaa5cf3052d45a924ef1866cf)
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 7de7138..226cb2f 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -239,8 +239,6 @@ void QuartzUpdateScreens(void) {
AppleWMSetScreenOrigin(pRoot);
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
- miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
-
/* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration
* http://xquartz.macosforge.org/trac/ticket/346
*/
@@ -268,6 +266,9 @@ void QuartzUpdateScreens(void) {
quartzProcs->UpdateScreen(pScreen);
+ /* miPaintWindow needs to be called after RootlessUpdateScreenPixmap (from xprUpdateScreen) */
+ miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+
/* Tell RandR about the new size, so new connections get the correct info */
RRScreenSizeNotify(pScreen);
}
commit dc6efd99887c90bb14e066e46b69ca5ba19b6a09
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Sun May 22 09:32:57 2011 -0700
XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
If CG reports no displays when launching, we could crash in RandR. Instead, just
provide a fake 800x600 display until we are notified about displays being attached.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 60af79e35ee8546a99d15a1358aac3deabfa22be)
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 11e5a74..7de7138 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -464,11 +464,15 @@ void QuartzSpaceChanged(uint32_t space_id) {
void QuartzCopyDisplayIDs(ScreenPtr pScreen,
int displayCount, CGDirectDisplayID *displayIDs) {
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- int size = displayCount * sizeof(CGDirectDisplayID);
free(pQuartzScreen->displayIDs);
- pQuartzScreen->displayIDs = malloc(size);
- memcpy(pQuartzScreen->displayIDs, displayIDs, size);
+ if(displayCount) {
+ size_t size = displayCount * sizeof(CGDirectDisplayID);
+ pQuartzScreen->displayIDs = malloc(size);
+ memcpy(pQuartzScreen->displayIDs, displayIDs, size);
+ } else {
+ pQuartzScreen->displayIDs = NULL;
+ }
pQuartzScreen->displayCount = displayCount;
}
diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c
index d452b02..98b382d 100644
--- a/hw/xquartz/quartzRandR.c
+++ b/hw/xquartz/quartzRandR.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons,
* 2010 Jan Hauffa.
- * 2010 Apple Inc.
+ * 2010-2011 Apple Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -124,44 +124,48 @@ static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
QuartzModeCallback callback,
void *data) {
- CFDictionaryRef curModeRef, modeRef;
- long curBpp;
- CFArrayRef modes;
- QuartzModeInfo modeInfo;
- int i;
- BOOL retval = FALSE;
+ Bool retval = FALSE;
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
- curModeRef = CGDisplayCurrentMode(screenId);
- if (!curModeRef)
- return FALSE;
- curBpp = getDictLong(curModeRef, kCGDisplayBitsPerPixel);
+ /* Just an 800x600 fallback if we have no attached heads */
+ if(pQuartzScreen->displayIDs) {
+ CFDictionaryRef curModeRef, modeRef;
+ long curBpp;
+ CFArrayRef modes;
+ QuartzModeInfo modeInfo;
+ int i;
+ CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
+
+ curModeRef = CGDisplayCurrentMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+ curBpp = getDictLong(curModeRef, kCGDisplayBitsPerPixel);
- modes = CGDisplayAvailableModes(screenId);
- if (!modes)
- return FALSE;
- for (i = 0; i < CFArrayGetCount(modes); i++) {
- int cb;
- modeRef = (CFDictionaryRef) CFArrayGetValueAtIndex(modes, i);
-
- /* Skip modes that are not usable on the current display or have a
- different pixel encoding than the current mode. */
- if (((unsigned long) getDictLong(modeRef, kCGDisplayIOFlags) &
- kDisplayModeUsableFlags) != kDisplayModeUsableFlags)
- continue;
- if (getDictLong(modeRef, kCGDisplayBitsPerPixel) != curBpp)
- continue;
-
- QuartzRandRGetModeInfo(modeRef, &modeInfo);
- modeInfo.ref = (void *)modeRef;
- cb = callback(pScreen, &modeInfo, data);
- if (cb == CALLBACK_CONTINUE)
- retval = TRUE;
- else if (cb == CALLBACK_SUCCESS)
- return TRUE;
- else if (cb == CALLBACK_ERROR)
+ modes = CGDisplayAvailableModes(screenId);
+ if (!modes)
return FALSE;
+ for (i = 0; i < CFArrayGetCount(modes); i++) {
+ int cb;
+ modeRef = (CFDictionaryRef) CFArrayGetValueAtIndex(modes, i);
+
+ /* Skip modes that are not usable on the current display or have a
+ different pixel encoding than the current mode. */
+ if (((unsigned long) getDictLong(modeRef, kCGDisplayIOFlags) &
+ kDisplayModeUsableFlags) != kDisplayModeUsableFlags)
+ continue;
+ if (getDictLong(modeRef, kCGDisplayBitsPerPixel) != curBpp)
+ continue;
+
+ QuartzRandRGetModeInfo(modeRef, &modeInfo);
+ modeInfo.ref = (void *)modeRef;
+ cb = callback(pScreen, &modeInfo, data);
+ if (cb == CALLBACK_CONTINUE)
+ retval = TRUE;
+ else if (cb == CALLBACK_SUCCESS)
+ return TRUE;
+ else if (cb == CALLBACK_ERROR)
+ return FALSE;
+ }
}
switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
@@ -225,61 +229,64 @@ static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId,
static Bool QuartzRandREnumerateModes (ScreenPtr pScreen,
QuartzModeCallback callback,
void *data) {
- CGDisplayModeRef curModeRef, modeRef;
- CFStringRef curPixelEnc, pixelEnc;
- CFComparisonResult pixelEncEqual;
- CFArrayRef modes;
- QuartzModeInfo modeInfo;
- int i;
Bool retval = FALSE;
-
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
- curModeRef = CGDisplayCopyDisplayMode(screenId);
- if (!curModeRef)
- return FALSE;
- curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef);
- CGDisplayModeRelease(curModeRef);
+ /* Just an 800x600 fallback if we have no attached heads */
+ if(pQuartzScreen->displayIDs) {
+ CGDisplayModeRef curModeRef, modeRef;
+ CFStringRef curPixelEnc, pixelEnc;
+ CFComparisonResult pixelEncEqual;
+ CFArrayRef modes;
+ QuartzModeInfo modeInfo;
+ int i;
+ CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
+
+ curModeRef = CGDisplayCopyDisplayMode(screenId);
+ if (!curModeRef)
+ return FALSE;
+ curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef);
+ CGDisplayModeRelease(curModeRef);
- modes = CGDisplayCopyAllDisplayModes(screenId, NULL);
- if (!modes) {
- CFRelease(curPixelEnc);
- return FALSE;
- }
- for (i = 0; i < CFArrayGetCount(modes); i++) {
- int cb;
- modeRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
-
- /* Skip modes that are not usable on the current display or have a
- different pixel encoding than the current mode. */
- if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) !=
- kDisplayModeUsableFlags)
- continue;
- pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef);
- pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0);
- CFRelease(pixelEnc);
- if (pixelEncEqual != kCFCompareEqualTo)
- continue;
-
- QuartzRandRGetModeInfo(modeRef, &modeInfo);
- modeInfo.ref = modeRef;
- cb = callback(pScreen, &modeInfo, data);
- if (cb == CALLBACK_CONTINUE) {
- retval = TRUE;
- } else if (cb == CALLBACK_SUCCESS) {
- CFRelease(modes);
- CFRelease(curPixelEnc);
- return TRUE;
- } else if (cb == CALLBACK_ERROR) {
- CFRelease(modes);
+ modes = CGDisplayCopyAllDisplayModes(screenId, NULL);
+ if (!modes) {
CFRelease(curPixelEnc);
return FALSE;
}
- }
+ for (i = 0; i < CFArrayGetCount(modes); i++) {
+ int cb;
+ modeRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
+
+ /* Skip modes that are not usable on the current display or have a
+ different pixel encoding than the current mode. */
+ if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) !=
+ kDisplayModeUsableFlags)
+ continue;
+ pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef);
+ pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0);
+ CFRelease(pixelEnc);
+ if (pixelEncEqual != kCFCompareEqualTo)
+ continue;
+
+ QuartzRandRGetModeInfo(modeRef, &modeInfo);
+ modeInfo.ref = modeRef;
+ cb = callback(pScreen, &modeInfo, data);
+ if (cb == CALLBACK_CONTINUE) {
+ retval = TRUE;
+ } else if (cb == CALLBACK_SUCCESS) {
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+ return TRUE;
+ } else if (cb == CALLBACK_ERROR) {
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+ return FALSE;
+ }
+ }
- CFRelease(modes);
- CFRelease(curPixelEnc);
+ CFRelease(modes);
+ CFRelease(curPixelEnc);
+ }
switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) {
case CALLBACK_SUCCESS:
@@ -347,9 +354,13 @@ static int QuartzRandRRegisterModeCallback (ScreenPtr pScreen,
static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL doRegister) {
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0];
Bool captureDisplay = (pMode->refresh != FAKE_REFRESH_FULLSCREEN && pMode->refresh != FAKE_REFRESH_ROOTLESS);
+ CGDirectDisplayID screenId;
+ if(pQuartzScreen->displayIDs == NULL)
+ return FALSE;
+
+ screenId = pQuartzScreen->displayIDs[0];
if(XQuartzShieldingWindowLevel == 0 && captureDisplay) {
if(!X11ApplicationCanEnterRandR())
return FALSE;
@@ -379,7 +390,8 @@ static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL
if(pQuartzScreen->currentMode.ref)
CFRelease(pQuartzScreen->currentMode.ref);
pQuartzScreen->currentMode = *pMode;
- CFRetain(pQuartzScreen->currentMode.ref);
+ if(pQuartzScreen->currentMode.ref)
+ CFRetain(pQuartzScreen->currentMode.ref);
if(XQuartzShieldingWindowLevel != 0 && !captureDisplay) {
CGReleaseAllDisplays();
@@ -406,13 +418,8 @@ static int QuartzRandRSetModeCallback (ScreenPtr pScreen,
}
static Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
- QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
-
*rotations = RR_Rotate_0; /* TODO: support rotation */
- if (pQuartzScreen->displayCount == 0)
- return FALSE;
-
return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL);
}
@@ -427,9 +434,6 @@ static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
reqMode.height = pSize->height;
reqMode.refresh = rate;
- if (pQuartzScreen->displayCount == 0)
- return FALSE;
-
/* Do not switch modes if requested mode is equal to current mode. */
if (QuartzRandRModesEqual(&reqMode, &pQuartzScreen->currentMode))
return TRUE;
@@ -446,9 +450,16 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
QuartzModeInfo activeMode;
- if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], &activeMode)) {
- ErrorF("Unable to determine current display mode.\n");
- return FALSE;
+ if(pQuartzScreen->displayCount > 0) {
+ if(!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], &activeMode)) {
+ ErrorF("Unable to determine current display mode.\n");
+ return FALSE;
+ }
+ } else {
+ memset(&activeMode, 0, sizeof(activeMode));
+ activeMode.width = 800;
+ activeMode.height = 600;
+ activeMode.refresh = 60;
}
if(pQuartzScreen->fullscreenMode.ref)
@@ -456,7 +467,7 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
if(pQuartzScreen->currentMode.ref)
CFRelease(pQuartzScreen->currentMode.ref);
- if (pQuartzScreen->displayCount > 1) {
+ if(pQuartzScreen->displayCount > 1) {
activeMode.width = pScreen->width;
activeMode.height = pScreen->height;
if(XQuartzIsRootless)
@@ -479,7 +490,8 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
/* This extra retain is for currentMode's copy.
* fullscreen and rootless share a retain.
*/
- CFRetain(pQuartzScreen->currentMode.ref);
+ if(pQuartzScreen->currentMode.ref)
+ CFRetain(pQuartzScreen->currentMode.ref);
DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 972278b..3684ad5 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -193,6 +193,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScr
*width = 800;
*height = 600;
PseudoramiXAddScreen(*x, *y, *width, *height);
+ QuartzCopyDisplayIDs(pScreen, 0, NULL);
return;
}
commit 1a665a8abd0ce1dbc50a1d889f11d5b74c78539e
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Fri May 20 22:59:27 2011 -0700
configure.ac: Bump version to 1.10.1.902 (1.10.2 RC2)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/configure.ac b/configure.ac
index 5f85383..3a2120c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-05-06"
+AC_INIT([xorg-server], 1.10.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-05-20"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
commit 52e27b446a69b4b196d7e59d4e92aaa073c83dae
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Mon May 16 21:07:13 2011 -0700
XQuartz: Bump bundle version to 2.6.3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 4ecf8e4..8873118 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.6.2</string>
+ <string>2.6.3</string>
<key>CFBundleVersion</key>
- <string>2.6.2</string>
+ <string>2.6.3</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
commit b4cb37d7255746f2ddf0ceb3334fc698cd818410
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Sat May 14 18:33:57 2011 -0700
XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 384eb45b944a4386eae74a5503423c13b5f2a659)
diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c
index 05641a6..d452b02 100644
--- a/hw/xquartz/quartzRandR.c
+++ b/hw/xquartz/quartzRandR.c
@@ -444,26 +444,29 @@ static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+ QuartzModeInfo activeMode;
+
+ if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], &activeMode)) {
+ ErrorF("Unable to determine current display mode.\n");
+ return FALSE;
+ }
if(pQuartzScreen->fullscreenMode.ref)
CFRelease(pQuartzScreen->fullscreenMode.ref);
if(pQuartzScreen->currentMode.ref)
CFRelease(pQuartzScreen->currentMode.ref);
-
- if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0],
- &pQuartzScreen->fullscreenMode))
- return FALSE;
if (pQuartzScreen->displayCount > 1) {
- pQuartzScreen->fullscreenMode.width = pScreen->width;
- pQuartzScreen->fullscreenMode.height = pScreen->height;
+ activeMode.width = pScreen->width;
+ activeMode.height = pScreen->height;
if(XQuartzIsRootless)
- pQuartzScreen->fullscreenMode.height += aquaMenuBarHeight;
+ activeMode.height += aquaMenuBarHeight;
}
+ pQuartzScreen->fullscreenMode = activeMode;
pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN;
- pQuartzScreen->rootlessMode = pQuartzScreen->fullscreenMode;
+ pQuartzScreen->rootlessMode = activeMode;
pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS;
pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight;
commit 69e3527e257af2aae82449bf0e0e7846ccd1ce0c
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date: Sat May 14 16:11:32 2011 -0700
XQuartz: Don't call mieqEnqueue during server shutdown
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 25191648b8db87735a99243697f73036255c1eb6)
diff --git a/dix/main.c b/dix/main.c
index 692bec1..e20ffd6 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -120,9 +120,9 @@ extern void Dispatch(void);
#ifdef XQUARTZ
#include <pthread.h>
-BOOL serverInitComplete = FALSE;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+BOOL serverRunning = FALSE;
+pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
int dix_main(int argc, char *argv[], char *envp[]);
@@ -275,18 +275,25 @@ int main(int argc, char *argv[], char *envp[])
}
#ifdef XQUARTZ
- /* Let the other threads know the server is done with its init */
- pthread_mutex_lock(&serverInitCompleteMutex);
- serverInitComplete = TRUE;
- pthread_cond_broadcast(&serverInitCompleteCond);
- pthread_mutex_unlock(&serverInitCompleteMutex);
+ /* Let the other threads know the server is done with its init */
+ pthread_mutex_lock(&serverRunningMutex);
+ serverRunning = TRUE;
+ pthread_cond_broadcast(&serverRunningCond);
+ pthread_mutex_unlock(&serverRunningMutex);
#endif
NotifyParentProcess();
Dispatch();
- UndisplayDevices();
+#ifdef XQUARTZ
+ /* Let the other threads know the server is no longer running */
+ pthread_mutex_lock(&serverRunningMutex);
+ serverRunning = FALSE;
+ pthread_mutex_unlock(&serverRunningMutex);
+#endif
+
+ UndisplayDevices();
/* Now free up whatever must be freed */
if (screenIsSaved == SCREEN_SAVER_ON)
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index b00e90a..0e85101 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -39,9 +39,9 @@ CFStringRef app_prefs_domain_cfstr;
/* Stubs */
char *display = NULL;
-BOOL serverInitComplete = YES;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+BOOL serverRunning = YES;
+pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
static void signal_handler (int sig) {
switch(sig) {
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index bb06465..f300c37 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -47,17 +47,17 @@ BOOL xpbproxy_is_standalone = NO;
x_selection *_selection_object;
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
-extern pthread_cond_t serverInitCompleteCond;
+extern BOOL serverRunning;
+extern pthread_mutex_t serverRunningMutex;
+extern pthread_cond_t serverRunningCond;
static inline void wait_for_server_init(void) {
/* If the server hasn't finished initializing, wait for it... */
- if(!serverInitComplete) {
- pthread_mutex_lock(&serverInitCompleteMutex);
- while(!serverInitComplete)
- pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
- pthread_mutex_unlock(&serverInitCompleteMutex);
+ if(!serverRunning) {
+ pthread_mutex_lock(&serverRunningMutex);
+ while(!serverRunning)
+ pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
+ pthread_mutex_unlock(&serverRunningMutex);
}
}
diff --git a/mi/mieq.c b/mi/mieq.c
index 01da52a..cd1e47f 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -83,17 +83,17 @@ static EventQueueRec miEventQueue;
#include <pthread.h>
static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
Reply to: