summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/saver.c2
-rw-r--r--config/10-evdev.conf8
-rw-r--r--config/Makefile.am5
-rw-r--r--config/udev.c7
-rw-r--r--configure.ac21
-rw-r--r--glx/glxcmdsswap.c8
-rw-r--r--glx/indirect_dispatch.c2
-rw-r--r--hw/kdrive/linux/evdev.c2
-rw-r--r--hw/xfree86/common/xf86AutoConfig.c95
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xfree86/common/xf86Xinput.c1
-rw-r--r--hw/xfree86/os-support/shared/posix_tty.c10
-rw-r--r--hw/xquartz/GL/capabilities.c3
-rw-r--r--hw/xquartz/bundle/Info.plist.cpp4
-rw-r--r--hw/xquartz/darwin.c10
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c11
-rw-r--r--hw/xquartz/quartz.c7
-rw-r--r--hw/xquartz/quartzKeyboard.c5
-rw-r--r--include/inputstr.h12
-rw-r--r--os/Makefile.am17
-rw-r--r--os/log.c9
-rw-r--r--os/utils.c2
-rw-r--r--render/glyph.c3
-rw-r--r--xkb/xkbUtils.c2
24 files changed, 175 insertions, 73 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index 2549e8a31..aa2e61428 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -620,10 +620,10 @@ CreateSaverWindow (ScreenPtr pScreen)
FreeResource (pWin->drawable.id, RT_NONE);
return FALSE;
}
+ pAttr->pCursor->refcnt++;
if (pWin->optional->cursor)
FreeCursor (pWin->optional->cursor, (Cursor)0);
pWin->optional->cursor = pAttr->pCursor;
- pAttr->pCursor->refcnt++;
pWin->cursorIsNone = FALSE;
CheckWindowOptionalNeed (pWin);
mask |= CWCursor;
diff --git a/config/10-evdev.conf b/config/10-evdev.conf
new file mode 100644
index 000000000..7406f4ef2
--- /dev/null
+++ b/config/10-evdev.conf
@@ -0,0 +1,8 @@
+#
+# Catch-all evdev loader for udev-based systems
+#
+Section "InputClass"
+ Identifier "evdev-catchall"
+ Driver "evdev"
+ MatchDevicePath "/dev/input/event*"
+EndSection
diff --git a/config/Makefile.am b/config/Makefile.am
index 27f251b3a..eed745483 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -9,6 +9,9 @@ AM_CFLAGS += $(UDEV_CFLAGS)
libconfig_la_SOURCES += udev.c
libconfig_la_LIBADD = $(UDEV_LIBS)
+xorgconfddir = $(prefix)/etc/X11/$(XF86CONFIGDIR)
+xorgconfd_DATA = 10-evdev.conf
+
else
if CONFIG_NEED_DBUS
@@ -33,4 +36,4 @@ endif # CONFIG_NEED_DBUS
endif # !CONFIG_UDEV
-EXTRA_DIST = xorg-server.conf x11-input.fdi
+EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf
diff --git a/config/udev.c b/config/udev.c
index 69257e935..452fb5a8d 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -73,8 +73,11 @@ device_added(struct udev_device *udev_device)
goto unwind;
parent = udev_device_get_parent(udev_device);
- if (parent)
- name = udev_device_get_property_value(parent, "NAME");
+ if (parent) {
+ name = udev_device_get_sysattr_value(parent, "name");
+ if (!name)
+ name = udev_device_get_property_value(parent, "NAME");
+ }
if (!name)
name = "(unnamed)";
else
diff --git a/configure.ac b/configure.ac
index 762565da4..27a00f669 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.7.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-03-21"
+AC_INIT([xorg-server], 1.8.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-04-02"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
@@ -315,6 +315,19 @@ AC_CHECK_HEADER([execinfo.h],[
])]
)
+dnl ARM needs additional compiler flags for proper backtraces if GCC is
+dnl used. Compile a dummy program with the -mapcs-frame option. If it
+dnl succeeds, we know that we are building for ARM with GCC.
+old_CFLAGS="$CFLAGS"
+CFLAGS="-mapcs-frame"
+AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([[ ]]),
+ ARM_BACKTRACE_CFLAGS="$CFLAGS",
+ ARM_BACKTRACE_CFLAGS=""
+)
+CFLAGS="$old_CFLAGS"
+AC_SUBST(ARM_BACKTRACE_CFLAGS)
+
dnl ---------------------------------------------------------------------------
dnl Bus options and CPU capabilities. Replaces logic in
dnl hw/xfree86/os-support/bus/Makefile.am, among others.
@@ -623,7 +636,7 @@ AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Mult
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no])
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
-AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: no)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=no])
+AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto])
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
@@ -1123,6 +1136,7 @@ MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
# XINPUT extension is integral part of the server
+AC_DEFINE(XINPUT, 1, [Support X Input extension])
XI_LIB='$(top_builddir)/Xi/libXi.la'
XI_INC='-I$(top_srcdir)/Xi'
@@ -1751,6 +1765,7 @@ if test "x$XORG" = xyes; then
dnl these only go in xorg-config.h
XF86CONFIGFILE="xorg.conf"
XF86CONFIGDIR="xorg.conf.d"
+ AC_SUBST(XF86CONFIGDIR)
CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
LOGPREFIX="$logdir/Xorg."
AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
index f1c0ce69f..c414dc8e2 100644
--- a/glx/glxcmdsswap.c
+++ b/glx/glxcmdsswap.c
@@ -354,7 +354,7 @@ int __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
{
- xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req;
+ xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_INT(&req->pbuffer);
@@ -364,7 +364,7 @@ int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
{
- xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) req;
+ xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_INT(&req->pbuffer);
@@ -375,7 +375,7 @@ int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
{
xGLXChangeDrawableAttributesReq *req =
- (xGLXChangeDrawableAttributesReq *) req;
+ (xGLXChangeDrawableAttributesReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
CARD32 *attribs;
@@ -392,7 +392,7 @@ int __glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState *cl,
GLbyte *pc)
{
xGLXChangeDrawableAttributesSGIXReq *req =
- (xGLXChangeDrawableAttributesSGIXReq *) req;
+ (xGLXChangeDrawableAttributesSGIXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
CARD32 *attribs;
diff --git a/glx/indirect_dispatch.c b/glx/indirect_dispatch.c
index 666551903..ecd2bc8de 100644
--- a/glx/indirect_dispatch.c
+++ b/glx/indirect_dispatch.c
@@ -98,8 +98,6 @@ void __glXDisp_CallLists(GLbyte * pc)
const GLenum type = *(GLenum *)(pc + 4);
const GLvoid * lists = (const GLvoid *)(pc + 8);
- lists = (const GLvoid *) (pc + 8);
-
CALL_CallLists( GET_DISPATCH(), (
n,
type,
diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c
index 485a2b557..0e4c9f735 100644
--- a/hw/kdrive/linux/evdev.c
+++ b/hw/kdrive/linux/evdev.c
@@ -362,7 +362,7 @@ readMapping (KdKeyboardInfo *ki)
return;
ki->minScanCode = 0;
- ki->maxScanCode = 193;
+ ki->maxScanCode = 247;
}
static void
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 7f4ada88b..7b836b00d 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -522,34 +522,40 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
}
}
-static char*
-chooseVideoDriver(void)
+/* copy a screen section and enter the desired driver
+ * and insert it at i in the list of screens */
+static Bool
+copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver)
{
- char *chosen_driver = NULL;
- int i;
- char *matches[20]; /* If we have more than 20 drivers we're in trouble */
+ GDevPtr cptr = NULL;
- listPossibleVideoDrivers(matches, 20);
+ xf86ConfigLayout.screens[i].screen = xnfcalloc(1, sizeof(confScreenRec));
+ if(!xf86ConfigLayout.screens[i].screen)
+ return FALSE;
+ memcpy(xf86ConfigLayout.screens[i].screen, oscreen, sizeof(confScreenRec));
- /* TODO Handle multiple drivers claiming to support the same PCI ID */
- chosen_driver = matches[0];
+ cptr = xcalloc(1, sizeof(GDevRec));
+ if (!cptr)
+ return FALSE;
+ memcpy(cptr, odev, sizeof(GDevRec));
- xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n",
- chosen_driver);
+ cptr->identifier = Xprintf("Autoconfigured Video Device %s", driver);
+ cptr->driver = driver;
- for (i = 0; matches[i] ; i++) {
- if (matches[i] != chosen_driver) {
- xfree(matches[i]);
- }
- }
+ /* now associate the new driver entry with the new screen entry */
+ xf86ConfigLayout.screens[i].screen->device = cptr;
+ cptr->myScreenSection = xf86ConfigLayout.screens[i].screen;
- return chosen_driver;
+ return TRUE;
}
GDevPtr
autoConfigDevice(GDevPtr preconf_device)
{
GDevPtr ptr = NULL;
+ char *matches[20]; /* If we have more than 20 drivers we're in trouble */
+ int num_matches = 0, num_screens = 0, i;
+ screenLayoutPtr slp;
if (!xf86configptr) {
return NULL;
@@ -573,14 +579,59 @@ autoConfigDevice(GDevPtr preconf_device)
ptr->driver = NULL;
}
if (!ptr->driver) {
- ptr->driver = chooseVideoDriver();
- }
+ /* get all possible video drivers and count them */
+ listPossibleVideoDrivers(matches, 20);
+ for (; matches[num_matches]; num_matches++) {
+ xf86Msg(X_DEFAULT, "Matched %s as autoconfigured driver %d\n",
+ matches[num_matches], num_matches);
+ }
+
+ slp = xf86ConfigLayout.screens;
+ if (slp) {
+ /* count the number of screens and make space for
+ * a new screen for each additional possible driver
+ * minus one for the already existing first one
+ * plus one for the terminating NULL */
+ for (; slp[num_screens].screen; num_screens++);
+ xf86ConfigLayout.screens = xnfcalloc(num_screens + num_matches,
+ sizeof(screenLayoutRec));
+ xf86ConfigLayout.screens[0] = slp[0];
+
+ /* do the first match and set that for the original first screen */
+ ptr->driver = matches[0];
+ if (!xf86ConfigLayout.screens[0].screen->device) {
+ xf86ConfigLayout.screens[0].screen->device = ptr;
+ ptr->myScreenSection = xf86ConfigLayout.screens[0].screen;
+ }
+
+ /* for each other driver found, copy the first screen, insert it
+ * into the list of screens and set the driver */
+ i = 0;
+ while (i++ < num_matches) {
+ if (!copyScreen(slp[0].screen, ptr, i, matches[i]))
+ return NULL;
+ }
- /* TODO Handle multiple screen sections */
- if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) {
- xf86ConfigLayout.screens->screen->device = ptr;
- ptr->myScreenSection = xf86ConfigLayout.screens->screen;
+ /* shift the rest of the original screen list
+ * to the end of the current screen list
+ *
+ * TODO Handle rest of multiple screen sections */
+ for (i = 1; i < num_screens; i++) {
+ xf86ConfigLayout.screens[i+num_matches] = slp[i];
+ }
+ xf86ConfigLayout.screens[num_screens+num_matches-1].screen = NULL;
+ xfree(slp);
+ } else {
+ /* layout does not have any screens, not much to do */
+ ptr->driver = matches[0];
+ for (i = 1; matches[i] ; i++) {
+ if (matches[i] != matches[0]) {
+ xfree(matches[i]);
+ }
+ }
+ }
}
+
xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n");
return ptr;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 72241a776..71ac9a9fe 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1269,7 +1269,9 @@ AbortDDX(void)
* we might not have been wrapped yet. Therefore enable
* screen explicitely.
*/
+ xf86VGAarbiterLock(xf86Screens[i]);
(xf86Screens[i]->LeaveVT)(i, 0);
+ xf86VGAarbiterUnlock(xf86Screens[i]);
}
}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e9f7f2fb7..822922717 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -618,6 +618,7 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs)
"InputClass configuration");
return BadAlloc;
}
+ mergedopts = xf86ReplaceStrOption(mergedopts, "driver", idev->driver);
}
idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts);
diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index bf1bb03a3..4ba8599ab 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -137,19 +137,9 @@ xf86OpenSerial (pointer options)
if (!isatty (fd))
{
-#if 1
/* Allow non-tty devices to be opened. */
xfree(dev);
return (fd);
-#else
- xf86Msg (X_WARNING,
- "xf86OpenSerial: Specified device %s is not a tty\n",
- dev);
- SYSCALL (close (fd));
- errno = EINVAL;
- xfree(dev);
- return (-1);
-#endif
}
/* set up default port parameters */
diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index 2c5ec658c..fc7dd57dd 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -525,8 +525,7 @@ bool getGlCapabilities(struct glCapabilities *cap) {
conf = malloc(sizeof(*conf));
if(NULL == conf) {
- perror("malloc");
- OsAbort();
+ FatalError("Unable to allocate memory for OpenGL capabilities\n");
}
/* Copy the struct. */
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index e89d985f4..91c8c0393 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.5.0</string>
+ <string>2.5.1</string>
<key>CFBundleVersion</key>
- <string>2.5.0</string>
+ <string>2.5.1</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 066f5a596..d3f448820 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -602,7 +602,7 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
/*
- * OsVendorFataError
+ * OsVendorFatalError
*/
void OsVendorFatalError( void )
{
@@ -760,7 +760,7 @@ void ddxUseMsg( void )
*/
void ddxGiveUp( void )
{
- ErrorF( "Quitting Xquartz...\n" );
+ ErrorF( "Quitting Xquartz\n" );
}
@@ -773,11 +773,7 @@ void ddxGiveUp( void )
void AbortDDX( void )
{
ErrorF( " AbortDDX\n" );
- /*
- * This is needed for a abnormal server exit, since the normal exit stuff
- * MUST also be performed (i.e. the vt must be left in a defined state)
- */
- ddxGiveUp();
+ OsAbort();
}
#include "mivalidate.h" // for union _Validate used by windowstr.h
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 4872ff59b..42aa757ea 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -73,10 +73,11 @@ extern int noPanoramiXExtension;
#define XSERVER_VERSION "?"
#endif
-const int __crashreporter_info__len = 4096;
-const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
-char __crashreporter_info__buf[4096];
-char *__crashreporter_info__ = __crashreporter_info__buf;
+static char __crashreporter_info_buff__[4096] = {0};
+static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+asm (".desc ___crashreporter_info__, 0x10");
+
+static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
static char *launchd_id_prefix = NULL;
static char *server_bootstrap_name = NULL;
@@ -548,7 +549,7 @@ int main(int argc, char **argv, char **envp) {
noPanoramiXExtension = TRUE;
/* Setup the initial crasherporter info */
- strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
+ strlcpy(__crashreporter_info_buff__, __crashreporter_info__base, sizeof(__crashreporter_info_buff__));
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
for(i=0; i < argc; i++) {
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 59107be84..a611854e7 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -268,8 +268,11 @@ void QuartzUpdateScreens(void) {
DarwinAdjustScreenOrigins(&screenInfo);
quartzProcs->UpdateScreen(pScreen);
- sx = x + darwinMainScreenX;
- sy = y + darwinMainScreenY;
+ /* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins,
+ * so use it rather than x/y
+ */
+ sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
+ sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
/* Adjust the root window. */
pRoot = WindowTable[pScreen->myNum];
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index c9ef7cc81..a4a0b08bd 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -735,7 +735,10 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
if (err != noErr) continue;
}
- if (len > 0 && s[0] != 0x0010) {
+ /* Not sure why 0x0010 is there.
+ * 0x0000 - <rdar://problem/7793566> 'Unicode Hex Input' ...
+ */
+ if (len > 0 && s[0] != 0x0010 && s[0] != 0x0000) {
k[j] = ucs2keysym (s[0]);
if (dead_key_state != 0) k[j] = make_dead_key (k[j]);
}
diff --git a/include/inputstr.h b/include/inputstr.h
index 15184d071..de4026cb7 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -386,8 +386,16 @@ typedef struct {
int spriteTraceSize;
int spriteTraceGood;
- ScreenPtr pEnqueueScreen; /* screen events are being delivered to */
- ScreenPtr pDequeueScreen; /* screen events are being dispatched to */
+ /* Due to delays between event generation and event processing, it is
+ * possible that the pointer has crossed screen boundaries between the
+ * time in which it begins generating events and the time when
+ * those events are processed.
+ *
+ * pEnqueueScreen: screen the pointer was on when the event was generated
+ * pDequeueScreen: screen the pointer was on when the event is processed
+ */
+ ScreenPtr pEnqueueScreen;
+ ScreenPtr pDequeueScreen;
} SpriteRec, *SpritePtr;
diff --git a/os/Makefile.am b/os/Makefile.am
index 66a4a0f75..3e4f2c591 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -1,11 +1,19 @@
-noinst_LTLIBRARIES = libos.la
+noinst_LTLIBRARIES = libos.la liblog.la
AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS)
SECURERPC_SRCS = rpcauth.c
XDMCP_SRCS = xdmcp.c
STRLCAT_SRCS = strlcat.c strlcpy.c
-XORG_SRCS = log.c
+
+# Build a convenience library liblog.la that will be added into
+# libos.la. The split is done so that log.c can be built with
+# different compiler options.
+liblog_la_SOURCES = log.c
+# Add flags needed for proper backtraces of functions marked with GCC
+# __attribute__((noreturn)). Currently those flags are needed for
+# FatalError and AbortServer in log.c.
+liblog_la_CFLAGS = $(AM_CFLAGS) $(ARM_BACKTRACE_CFLAGS)
libos_la_SOURCES = \
WaitFor.c \
@@ -24,9 +32,8 @@ libos_la_SOURCES = \
xdmauth.c \
xsha1.c \
xstrans.c \
- xprintf.c \
- $(XORG_SRCS)
-libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS)
+ xprintf.c
+libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS) liblog.la
if SECURE_RPC
libos_la_SOURCES += $(SECURERPC_SRCS)
diff --git a/os/log.c b/os/log.c
index 5dce2d1ee..940b32f76 100644
--- a/os/log.c
+++ b/os/log.c
@@ -117,6 +117,12 @@ static char *saveBuffer = NULL;
static int bufferSize = 0, bufferUnused = 0, bufferPos = 0;
static Bool needBuffer = TRUE;
+#ifdef __APPLE__
+static char __crashreporter_info_buff__[4096] = {0};
+static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+asm (".desc ___crashreporter_info__, 0x10");
+#endif
+
/* Prefix strings for log messages. */
#ifndef X_UNKNOWN_STRING
#define X_UNKNOWN_STRING "(\?\?)"
@@ -529,6 +535,9 @@ FatalError(const char *f, ...)
ErrorF("\nFatal server error:\n");
va_start(args, f);
+#ifdef __APPLE__
+ (void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args);
+#endif
VErrorF(f, args);
va_end(args);
ErrorF("\n");
diff --git a/os/utils.c b/os/utils.c
index 46d936270..2a73a57ec 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1315,7 +1315,9 @@ OsReleaseSignals (void)
void
OsAbort (void)
{
+#ifndef __APPLE__
OsBlockSignals();
+#endif
abort();
}
diff --git a/render/glyph.c b/render/glyph.c
index 0b864ad4d..f0f3b1913 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -217,6 +217,9 @@ FindGlyphByHash (unsigned char sha1[20], int format)
GlyphRefPtr gr;
CARD32 signature = *(CARD32 *) sha1;
+ if (!globalGlyphs[format].hashSet)
+ return NULL;
+
gr = FindGlyphRef (&globalGlyphs[format],
signature, TRUE, sha1);
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 5b317c977..e28799759 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -753,7 +753,7 @@ XkbSrvLedInfoPtr sli;
if (cause!=NULL) {
xkbControlsNotify cn;
cn.numGroups= ctrls->num_groups;
- cn.changedControls|= XkbControlsEnabledMask;
+ cn.changedControls= XkbControlsEnabledMask;
cn.enabledControls= ctrls->enabled_ctrls;
cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
cn.keycode= cause->kc;