xserver: Branch 'master' - 12 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Mar 29 11:57:46 PDT 2010


 config/udev.c                            |    7 +++++--
 configure.ac                             |    1 +
 glx/indirect_dispatch.c                  |    2 --
 hw/xfree86/common/xf86Xinput.c           |    1 +
 hw/xfree86/os-support/shared/posix_tty.c |   10 ----------
 hw/xquartz/GL/capabilities.c             |    3 +--
 hw/xquartz/darwin.c                      |   10 +++-------
 hw/xquartz/mach-startup/bundle-main.c    |   11 ++++++-----
 hw/xquartz/quartz.c                      |    7 +++++--
 hw/xquartz/quartzKeyboard.c              |    5 ++++-
 include/inputstr.h                       |   12 ++++++++++--
 os/log.c                                 |    9 +++++++++
 os/utils.c                               |    2 ++
 xkb/xkbUtils.c                           |    2 +-
 14 files changed, 48 insertions(+), 34 deletions(-)

New commits:
commit 57cb1a854a1b6d91d214b3fa250a7df2ed20d433
Merge: 4b3d67a... 28a5f14...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Mar 29 11:46:00 2010 -0700

    Merge remote branch 'jeremyhu/master'

commit 4b3d67a7647f696957727948f9757a261e15d14e
Merge: 579715f... aa91508...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Mar 29 11:44:07 2010 -0700

    Merge remote branch 'whot/for-keith'

commit 28a5f14b4089dccb8045cc4fdc923542a73dd22d
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sun Mar 28 13:46:23 2010 -0700

    XQuartz: Re-query dixScreenOrigins as the value could've changed.
    
    Fix a regression in 9c9c3a85b094a3c7b2763a572715d710325091aa
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Acked-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 59107be..a611854 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];
commit 436d0bb9cca122bfdde32902b683d2499f61e6fc
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat Mar 27 17:35:10 2010 -0700

    darwin: Generate crash reports on FatalError()
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Acked-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index 2c5ec65..fc7dd57 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/darwin.c b/hw/xquartz/darwin.c
index 066f5a5..d3f4488 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 4872ff5..625b8b4 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/os/log.c b/os/log.c
index f4832c1..c1301d7 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		"(\?\?)"
@@ -527,6 +533,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 5a5a203..13d3b3f 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1315,7 +1315,9 @@ OsReleaseSignals (void)
 void
 OsAbort (void)
 {
+#ifndef __APPLE__
     OsBlockSignals();
+#endif
     abort();
 }
 
commit 73b3b67aac9f3938a96cb8822b9c270bd82ded5c
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>
    Acked-by: Adam Jackson <ajax at redhat.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 339207be6f184cc783076fc7e2cc12f92f57f2ba
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>
    Acked-by: Adam Jackson <ajax at redhat.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 aa91508356f243edc3b11795b1481edcfe0d39c2
Author: Dan Nicholson <dbn.lists at gmail.com>
Date:   Wed Mar 24 23:18:35 2010 -0700

    config/udev: Prefer product name from attribute rather than uevent
    
    The input device product name for evdev devices in the kernel uevent has
    embedded quotes that aren't expected here. Use the sysfs name attribute
    instead, which does not suffer this problem. The uevent name will be
    used as a fallback if no name attribute is found.
    
    Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/config/udev.c b/config/udev.c
index 69257e9..452fb5a 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
commit d00c3298a698ddddc8967215cef7dd941fa15804
Author: Fernando Carrijo <fcarrijo at yahoo.com.br>
Date:   Wed Mar 24 20:11:34 2010 -0300

    Cleanup some comments in SpriteRec
    
    Signed-off-by: Fernando Carrijo <fcarrijo at yahoo.com.br>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/include/inputstr.h b/include/inputstr.h
index 15184d0..de4026c 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;
 
commit 70bd02f2ea3a91c0340df97ca3b8a4f9400f6f46
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Mar 23 12:13:56 2010 +1000

    xfree86: merge driver from the input class into the options.
    
    A driver that is assigned by an input class is only present as idev->driver.
    The driver itself has no access to this information once PreInit is called.
    For devices that rely on chain-hotplugging (wacom), this means that for the
    second device the driver information is lost and the second device cannot be
    initialized through NewInputDeviceRequest. Although this could be worked
    around by hardcoding the driver name in the wacom driver, having the
    assigned driver in the options seems like the better solution.
    
    This issue only manifests itself with the udev backend. With HAL, the driver
    is assigned by HAL and the option is duplicated in config/hal.c.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e9f7f2f..8229227 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);
 
commit 8311cd5f89ca6781842bb24671b8122cdf8be148
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Mar 23 10:37:36 2010 -0700

    XKB: Fix garbage initialization
    
    XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify
    changedControls mask because it was uninitialized on the stack.
    
    Found by clang
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 5b317c9..e287997 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;
commit 0ecfab89d1754b0b7e32b3964b40663d1810cd62
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Mar 22 14:04:09 2010 +1000

    xfree86: remove if 1 from the dawn of time.
    
    7+ years for an if 1 should be enough to just admit that there's no other
    option.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Fernando Carrijo <fcarrijo at yahoo.com.br>
    Reviewed-by: Corbin Simpson <MostAwesomeDude at gmail.com>

diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index bf1bb03..4ba8599 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 */
commit 6389405b56d2221d8a7b80c4bb3bd3b4e1a29bab
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Mar 22 09:20:49 2010 +1000

    configure: Always define XINPUT.
    
    This define was removed in e251c9e75afdc "Remove all traces of #ifdef XINPUT
    and the matching bits from the configure.ac". Drivers that support multiple
    server versions and still check for ifdef XINPUT now always build without
    XINPUT support if they're calling XORG_DRIVER_CHECK_EXT(XINPUT, inputproto).
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>

diff --git a/configure.ac b/configure.ac
index d379b3a..92c34ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1122,6 +1122,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'
 


More information about the xorg-commit mailing list