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

Jeremy Huddleston jeremyhu at freedesktop.org
Sat May 15 23:32:53 PDT 2010


 configure.ac                |    8 +++++---
 dbe/dbe.c                   |    4 +---
 dbe/dbestruct.h             |    4 ----
 hw/xquartz/X11Application.m |    5 ++++-
 os/access.c                 |    9 ++++-----
 render/render.c             |    7 +++++++
 test/xi2/protocol-common.c  |    1 +
 7 files changed, 22 insertions(+), 16 deletions(-)

New commits:
commit 4e62009d57aed4d8b880e7c9e286b2b5b7aeb310
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat May 15 10:53:09 2010 -0700

    XQuartz: Don't trust deltaXY for middle mouse clicks.
    
    The middle mouse clicks return erroneous values after returning from
    Fast User Switching.
    
    <rdar://problem/7979468>
    http://xquartz.macosforge.org/trac/ticket/389
    
    Signed-off-by: Martin Otte <otte at duke.edu>
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index c9a0d66..ed9fb32 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1038,12 +1038,15 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
             location.x += frame.origin.x;
             location.y += frame.origin.y;
             lastpt = location;
-        } else if(isTabletEvent) {
+        } else if(isTabletEvent || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp) {
             // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
             // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
             // are not normally used in cases where that bug would present itself, so this is a fair tradeoff
             // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
             // http://xquartz.macosforge.org/trac/ticket/288
+            // The deltaXY for middle click events also appear erroneous after fast user switching
+            // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
+            // http://xquartz.macosforge.org/trac/ticket/389
             location = [e locationInWindow];
             lastpt = location;
         } else {
commit 345eb171264325d73ea2c50ba8c692cf589c2a9b
Author: Keith Packard <keithp at keithp.com>
Date:   Sat May 1 01:41:19 2010 -0700

    Remove dbe screen private privates.
    
    Each DBE Screen private structure could have nested privates. Oddly,
    no code ever used them.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/dbe/dbe.c b/dbe/dbe.c
index b28b3a0..a49a46d 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -1450,7 +1450,6 @@ DbeResetProc(ExtensionEntry *extEntry)
 	    if (pDbeScreenPriv->ResetProc)
 		(*pDbeScreenPriv->ResetProc)(pScreen);
 
-	    dixFreePrivates(pDbeScreenPriv->devPrivates);
 	    free(pDbeScreenPriv);
 	}
     }
@@ -1589,8 +1588,7 @@ DbeExtensionInit(void)
 
 	pScreen = screenInfo.screens[i];
 
-	if (!(pDbeScreenPriv =
-              (DbeScreenPrivPtr)calloc(1, sizeof(DbeScreenPrivRec))))
+	if (!(pDbeScreenPriv = malloc (sizeof (DbeScreenPrivRec))))
 	{
             /* If we can not alloc a window or screen private,
              * then free any privates that we already alloc'ed and return
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index 002ffbe..ba6b56d 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -217,10 +217,6 @@ typedef struct _DbeScreenPrivRec
 		ScreenPtr /*pScreen*/
 );
 
-    /* Device-specific private information.
-     */
-    PrivateRec	*devPrivates;
-
 } DbeScreenPrivRec, *DbeScreenPrivPtr;
 
 #endif /* DBE_STRUCT_H */
commit 87ea5760f86eb60840e6e2c10012915952df5377
Author: Keith Packard <keithp at keithp.com>
Date:   Mon May 10 11:46:25 2010 -0700

    Check pixmap allocation return value when creating glyphs
    
    The driver may decide that the pixmap is too large or something and
    fail to allocate a pixmap; not checking would lead to a segfault.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/render/render.c b/render/render.c
index bba1ce1..9aabcfb 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1140,6 +1140,12 @@ ProcRenderAddGlyphs (ClientPtr client)
 						   width, height, depth,
 						   CREATE_PIXMAP_USAGE_GLYPH_PICTURE);
 
+		if (!pDstPix)
+		{
+		    err = BadAlloc;
+		    goto bail;
+		}
+
 		GlyphPicture (glyph)[screen] = pDst =
 			CreatePicture (0, &pDstPix->drawable,
 				       glyphSet->format,
@@ -1149,6 +1155,7 @@ ProcRenderAddGlyphs (ClientPtr client)
 		/* The picture takes a reference to the pixmap, so we
 		   drop ours. */
 		(pScreen->DestroyPixmap) (pDstPix);
+		pDstPix = NULL;
 
 		if (! pDst)
 		{
commit 03f7e92a6cbfe58db08ce840283f9809695c70e7
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon May 10 13:44:30 2010 -0700

    Update list of supported platforms in configure.ac error message
    
    Adds DragonFly BSD, OpenSolaris, & GNU Hurd.
    Drops MacOS X, since this is in the section specific to the Xorg/XFree86 DDX.
    (Matches the OS patterns the configure script checks for.)
    
    Also uses m4 macros to fix the spacing/formatting of the resulting message.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Acked-by: Gaetan Nadon <memsize at videotron.ca>

diff --git a/configure.ac b/configure.ac
index a25b1f4..cf2a358 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1704,9 +1704,11 @@ if test "x$XORG" = xyes; then
 	  *)
 	  	XORG_OS="unknown"
 		XORG_OS_SUBDIR="unknown"
-		AC_MSG_ERROR([Your OS is unknown. Xorg currently only supports Linux, \
-		Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \
-	        Xorg to your platform, please email xorg at lists.freedesktop.org.])
+		AC_MSG_ERROR([m4_text_wrap(m4_join([ ],
+		[Your OS is unknown. Xorg currently only supports Linux,],
+		[Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.],
+		[If you are interested in porting Xorg to your platform,],
+		[please email xorg at lists.freedesktop.org.]))])
 		;;
 	esac
 
commit e42a29d269fadc11e065c63ee369e3165196f2d7
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Thu Apr 29 18:45:34 2010 -0700

    Fix compiler issues with getifaddrs() call on OpenSolaris
    
    OpenSolaris recently added support for the getifaddrs() API.
    
    Building with that uncovered two compiler issues (one warning, one error)
    in the code that was now being built for the first time in our builds:
    
    "access.c", line 768: warning: argument #1 is incompatible with prototype:
            prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213
            argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2}
    
    "access.c", line 838: assignment type mismatch:
            struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2}
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/os/access.c b/os/access.c
index a39366e..2473ba4 100644
--- a/os/access.c
+++ b/os/access.c
@@ -765,7 +765,8 @@ DefineSelf (int fd)
 	    continue;
 #endif /* DNETCONN */
 	len = sizeof(*(ifr->ifa_addr));
-	family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
+	family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len,
+			     (pointer *)&addr);
 	if (family == -1 || family == FamilyLocal) 
 	    continue;
 #if defined(IPv6) && defined(AF_INET6)
@@ -789,7 +790,6 @@ DefineSelf (int fd)
 	}
 #ifdef XDMCP
 	{
-	    struct sockaddr broad_addr;
 	    /*
 	     * If this isn't an Internet Address, don't register it.
 	     */
@@ -835,11 +835,10 @@ DefineSelf (int fd)
 	    if ((ifr->ifa_flags & IFF_BROADCAST) &&
 		(ifr->ifa_flags & IFF_UP) &&
                 ifr->ifa_broadaddr)
-		broad_addr = *ifr->ifa_broadaddr;
+		XdmcpRegisterBroadcastAddress(
+		    (struct sockaddr_in *) ifr->ifa_broadaddr);
 	    else
 		continue;
-	    XdmcpRegisterBroadcastAddress((struct sockaddr_in *)
-					  &broad_addr);
 	}
 #endif /* XDMCP */
 		
commit c6613cfc26e76b296e620640bf33e756eb4ae178
Author: Jamey Sharp <jamey at minilop.net>
Date:   Fri May 14 10:36:13 2010 -0700

    test/xi2: Initialize predefined atoms before XInputExtensionInit.
    
    XInputExtensionInit calls MakeAtom, which doesn't work without the atoms
    table initialized.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Cc: Peter Hutterer <peter.hutterer at who-t.net>
    Tested-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index d0e93f2..fd93e15 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -152,6 +152,7 @@ void init_simple(void)
     screen.SetCursorPosition = set_cursor_pos;
 
     dixResetPrivates();
+    InitAtoms();
     XInputExtensionInit();
     init_window(&root, NULL, ROOT_WINDOW_ID);
     init_window(&window, &root, CLIENT_WINDOW_ID);


More information about the Xquartz-changes mailing list