[Xquartz-changes] xserver: Branch 'master' - 6 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Thu Mar 25 22:17:22 PDT 2010


Rebased ref, commits from common ancestor:
commit f262399382651099b5b18b2b10e7ed57f62aad58
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Mar 22 09:30:51 2010 -0700

    GLX: Remove a redundant initialization
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/glx/indirect_dispatch.c b/glx/indirect_dispatch.c
index 6665519..ecd2bc8 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,
commit c96deff2159d77b9933a89e637b07c7dbc573216
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Thu Mar 25 22:15:58 2010 -0700

    XQuartz: Workaround weird key data reported on some layouts
    
    This should make 'Unicode Hex Input' work as an input layout.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index c9ef7cc..a4a0b08 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]);
                 }
commit 579715f830fbbca9e1ecb17dc18176132f5969e7
Author: Rami Ylimaki <ext-rami.ylimaki at nokia.com>
Date:   Wed Mar 17 12:16:57 2010 +0200

    os: Prevent backtrace from being stopped in noreturn functions.
    
    There are two noreturn functions in the X server: FatalError and
    AbortServer. Having any of those two functions in the middle of a call
    stack will prevent unwinding the program properly and stops the
    backtrace at those functions in gdb.
    
    The file containing FatalError and AbortServer, os/log.c, has to be
    compiled with the -mapcs-frame option on ARM to get proper
    backtraces. Automake imposes its own restrictions on compiling
    individual source files with different options. The recommended way to
    do this is to put os/log.c into a convenience library and add this
    library inside os/libos.la. See the documentation of GNU Automake
    manual, version 1.11.1, section 27.8 Per-Object Flags Emulation, for
    details.
    
    Signed-off-by: Rami Ylimaki <ext-rami.ylimaki at nokia.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index d379b3a..5f08688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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.
diff --git a/os/Makefile.am b/os/Makefile.am
index 66a4a0f..3e4f2c5 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)
commit e086b99c1f5ce351b578de7cd9f616bc79d6cf64
Author: Mikhail Gusarov <dottedmag at dottedmag.net>
Date:   Tue Mar 23 01:03:53 2010 +0600

    kdrive: Bump evdev maxKeycode
    
    There are keycodes > 193 in evdev, e.g. KEY_WIMAX which is 246 .
    
    Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Acked-by: Adam Jackson <ajax at nwnk.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c
index 485a2b5..0e4c9f7 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
commit 185185eeb44a277c324be0f58a4b4a469b56b69b
Author: Peter Harris <pharris at opentext.com>
Date:   Tue Mar 23 12:08:19 2010 -0400

    Fix crash when all glyphs of a given depth are freed, but not all glyphsets
    
    This is how the crash can be triggered with only two clients on the system:
    Client A: (already running)
    Client B: Connect
    Client B: CreateGlyphSet(depthN)
    Client A: Disconnect
    Server: free globalGlyphs(depthN)
    Client B: AddGlyphs(depthN)
    Server: SEGV
    
    This crash was introduced with the FindGlyphsByHash function
    in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision,
    ResizeGlyphSet was always called before FindGlyphRef, which would
    re-create globalGlyphs(depthN) if necessary.
    
    X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718>
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Peter Harris <pharris at opentext.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/render/glyph.c b/render/glyph.c
index 0b864ad..f0f3b19 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);
 
commit 0c2fde5c8ad6e94b4ed1588aa93256a2b64f74d9
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Mon Mar 22 11:20:15 2010 -0700

    Fix typos in the swap functions
    
    This should fix bug #3539.
    
    Signed-off-by: Tomas Carnecky <tom at dbservice.com>
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
index f1c0ce6..c414dc8 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;


More information about the Xquartz-changes mailing list