[Xquartz-changes] xserver: Branch 'server-1.7-apple' - 10 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Mar 16 11:42:15 PDT 2010


Rebased ref, commits from common ancestor:
commit 782fa522f38a0dce4e27edc116e1181cf7523e52
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jan 15 11:39:36 2010 +1000

    dix: if owner-events is true for passive grabs, add the window mask (#25400)
    
    A client requesting a GrabModeSync button grab, owner-events true, with only
    the ButtonRelease mask set would never receive the press event even if the
    grab window had the ButtonPress mask set.
    
    The protocol requires that if owner-events is true, then the delivery mask
    is the combination of the grab mask + the window event mask.
    
    X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Tested-by: Jim Ramsay <i.am at jimramsay.com>

diff --git a/dix/events.c b/dix/events.c
index 3c625db..732740e 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3552,6 +3552,8 @@ CheckPassiveGrabsOnWindow(
                 xE = &core;
                 count = 1;
                 mask = grab->eventMask;
+                if (grab->ownerEvents)
+                    mask |= pWin->eventMask;
             } else if (match & XI2_MATCH)
             {
                 rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3573,6 +3575,24 @@ CheckPassiveGrabsOnWindow(
                     mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
                 else if (event->type == XI_Enter || event->type == XI_FocusIn)
                     mask = grab->xi2mask[device->id][event->type/8];
+
+                if (grab->ownerEvents && wOtherInputMasks(grab->window))
+                {
+                    InputClientsPtr icp =
+                        wOtherInputMasks(grab->window)->inputClients;
+
+                    while(icp)
+                    {
+                        if (rClient(icp) == rClient(grab))
+                        {
+                            int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
+                            mask |= icp->xi2mask[device->id][evtype/8];
+                            break;
+                        }
+
+                        icp = icp->next;
+                    }
+                }
             } else
             {
                 rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3584,6 +3604,22 @@ CheckPassiveGrabsOnWindow(
                     continue;
                 }
                 mask = grab->eventMask;
+                if (grab->ownerEvents && wOtherInputMasks(grab->window))
+                {
+                    InputClientsPtr icp =
+                        wOtherInputMasks(grab->window)->inputClients;
+
+                    while(icp)
+                    {
+                        if (rClient(icp) == rClient(grab))
+                        {
+                            mask |= icp->mask[device->id];
+                            break;
+                        }
+
+                        icp = icp->next;
+                    }
+                }
             }
 
 	    (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
commit 2528f89af730b9aaa4d5602309b6294a07dfc9bc
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Jan 31 01:38:53 2010 -0800

    fb: Revert fb changes that broke XQuartz
    
    http://bugs.freedesktop.org/show_bug.cgi?id=26124
    
    Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
    Revert "fb: backport fb changes from master for src window operations."
    
    This reverts commit 66b6e2fd49fdc650703e56aa176a902e4921251c.
    This reverts commit 2d6a8f668342a5190cdf43b5d385f592d10f5900.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>

diff --git a/fb/fb.h b/fb/fb.h
index 8b2839a..37de71e 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -700,41 +700,38 @@ typedef struct {
 #define __fbPixOffXPix(pPix)	(__fbPixDrawableX(pPix))
 #define __fbPixOffYPix(pPix)	(__fbPixDrawableY(pPix))
 
-#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) {			\
-    if ((pDrawable)->type != DRAWABLE_PIXMAP) { 				\
-	(pixmap) = fbGetWindowPixmap(pDrawable);				\
-	(xoff) = __fbPixOffXWin(pixmap); 					\
-	(yoff) = __fbPixOffYWin(pixmap); 					\
-    } else { 									\
-	(pixmap) = (PixmapPtr) (pDrawable);					\
-	(xoff) = __fbPixOffXPix(pixmap); 					\
-	(yoff) = __fbPixOffYPix(pixmap); 					\
-    } 										\
-    fbPrepareAccess(pDrawable); 						\
-}
-
-#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) {			\
-    (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; 			       	\
-    (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride);	\
-    (bpp) = (pixmap)->drawable.bitsPerPixel;  (void)(bpp); 			\
-}
-
-#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) {			\
-    (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; 			       	\
-    (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride);	\
-    (bpp) = (pixmap)->drawable.bitsPerPixel;  (void)(bpp); 			\
-}
-
-#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { 		\
-    PixmapPtr   _pPix; 								\
-    fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); 				\
-    fbGetPixmapBitsData(_pPix, pointer, stride, bpp);				\
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+    PixmapPtr   _pPix; \
+    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+	_pPix = fbGetWindowPixmap(pDrawable); \
+	(xoff) = __fbPixOffXWin(_pPix); \
+	(yoff) = __fbPixOffYWin(_pPix); \
+    } else { \
+	_pPix = (PixmapPtr) (pDrawable); \
+	(xoff) = __fbPixOffXPix(_pPix); \
+	(yoff) = __fbPixOffYPix(_pPix); \
+    } \
+    fbPrepareAccess(pDrawable); \
+    (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
+    (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
+    (bpp) = _pPix->drawable.bitsPerPixel;  (void)(bpp); \
 }
 
-#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { 	\
-    PixmapPtr   _pPix; 								\
-    fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff);				\
-    fbGetPixmapStipData(_pPix, pointer, stride, bpp);				\
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+    PixmapPtr   _pPix; \
+    if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+	_pPix = fbGetWindowPixmap(pDrawable); \
+	(xoff) = __fbPixOffXWin(_pPix); \
+	(yoff) = __fbPixOffYWin(_pPix); \
+    } else { \
+	_pPix = (PixmapPtr) (pDrawable); \
+	(xoff) = __fbPixOffXPix(_pPix); \
+	(yoff) = __fbPixOffYPix(_pPix); \
+    } \
+    fbPrepareAccess(pDrawable); \
+    (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
+    (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
+    (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
 }
 
 /*
@@ -2082,16 +2079,9 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
 		   FbBits	xor);
 
 extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr	pict,
-		 Bool		has_clip,
-		 Bool		is_src);
-
-extern _X_EXPORT pixman_image_t *
-image_from_pict_18 (PicturePtr	pict,
-		 Bool		has_clip,
-		 int		*xoff,
-		 int		*yoff);
-
+image_from_pict (PicturePtr pict,
+		 Bool       has_clip,
+		 Bool       is_src);
 extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
 
 #endif /* _FB_H_ */
diff --git a/fb/fbpict.c b/fb/fbpict.c
index c046bae..8fdaa58 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -158,24 +158,19 @@ fbComposite (CARD8      op,
 	     CARD16     height)
 {
     pixman_image_t *src, *mask, *dest;
-    int src_xoff, src_yoff;
-    int msk_xoff, msk_yoff;
-    int dst_xoff, dst_yoff;
     
-    miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
+    miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
     if (pMask)
-	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
+	miCompositeSourceValidate (pMask, xMask, yMask, width, height);
     
-    src = image_from_pict_18 (pSrc, FALSE, &src_xoff, &src_yoff);
-    mask = image_from_pict_18 (pMask, FALSE, &msk_xoff, &msk_yoff);
-    dest = image_from_pict_18 (pDst, TRUE, &dst_xoff, &dst_yoff);
+    src = image_from_pict (pSrc, TRUE, TRUE);
+    mask = image_from_pict (pMask, TRUE, TRUE);
+    dest = image_from_pict (pDst, TRUE, FALSE);
 
     if (src && dest && !(pMask && !mask))
     {
 	pixman_image_composite (op, src, mask, dest,
-				xSrc + src_xoff, ySrc + src_yoff,
-				xMask + msk_xoff, yMask + msk_yoff,
-				xDst + dst_xoff, yDst + dst_yoff,
+				xSrc, ySrc, xMask, yMask, xDst, yDst,
 				width, height);
     }
 
@@ -275,22 +270,22 @@ create_conical_gradient_image (PictGradient *gradient)
 
 static pixman_image_t *
 create_bits_picture (PicturePtr pict,
-		     Bool       has_clip,
-		     int	*xoff,
-		     int	*yoff)
+		     Bool       has_clip)
 {
-    PixmapPtr pixmap;
     FbBits *bits;
     FbStride stride;
-    int bpp;
+    int bpp, xoff, yoff;
     pixman_image_t *image;
     
-    fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
-    fbGetPixmapBitsData(pixmap, bits, stride, bpp);
+    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
+
+    bits = (FbBits*)((CARD8*)bits +
+		     (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
+		     (pict->pDrawable->x + xoff) * (bpp / 8));
 
     image = pixman_image_create_bits (
 	pict->format,
-	pixmap->drawable.width, pixmap->drawable.height,
+	pict->pDrawable->width, pict->pDrawable->height,
 	(uint32_t *)bits, stride * sizeof (FbStride));
     
     
@@ -316,52 +311,30 @@ create_bits_picture (PicturePtr pict,
 	if (pict->clientClipType != CT_NONE)
 	    pixman_image_set_has_client_clip (image, TRUE);
 
-	if (*xoff || *yoff)
-	    pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
+	pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
 
 	pixman_image_set_clip_region (image, pict->pCompositeClip);
 
-	if (*xoff || *yoff)
-	    pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
+	pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
     }
     
     /* Indexed table */
     if (pict->pFormat->index.devPrivate)
 	pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
 
-    /* Add in drawable origin to position within the image */
-    *xoff += pict->pDrawable->x;
-    *yoff += pict->pDrawable->y;
-
     return image;
 }
 
 static void
-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+set_image_properties (pixman_image_t *image, PicturePtr pict)
 {
     pixman_repeat_t repeat;
     pixman_filter_t filter;
     
     if (pict->transform)
     {
-	/* For source images, adjust the transform to account
-	 * for the drawable offset within the pixman image,
-	 * then set the offset to 0 as it will be used
-	 * to compute positions within the transformed image.
-	 */
-	if (!has_clip) {
-	    struct pixman_transform	adjusted;
-
-	    adjusted = *pict->transform;
-	    pixman_transform_translate(&adjusted,
-				       NULL,
-				       pixman_int_to_fixed(*xoff),
-				       pixman_int_to_fixed(*yoff));
-	    pixman_image_set_transform (image, &adjusted);
-	    *xoff = 0;
-	    *yoff = 0;
-	} else
-	    pixman_image_set_transform (image, pict->transform);
+	pixman_image_set_transform (
+	    image, (pixman_transform_t *)pict->transform);
     }
     
     switch (pict->repeatType)
@@ -388,8 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
     
     if (pict->alphaMap)
     {
-	int alpha_xoff, alpha_yoff;
-	pixman_image_t *alpha_map = image_from_pict_18 (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
+	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE, TRUE);
 	
 	pixman_image_set_alpha_map (
 	    image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -421,9 +393,10 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
     pixman_image_set_source_clipping (image, TRUE);
 }
 
-
 pixman_image_t *
-image_from_pict_18 (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+image_from_pict (PicturePtr pict,
+		 Bool has_clip,
+		 Bool is_src)
 {
     pixman_image_t *image = NULL;
 
@@ -432,7 +405,7 @@ image_from_pict_18 (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
 
     if (pict->pDrawable)
     {
-	image = create_bits_picture (pict, has_clip, xoff, yoff);
+	image = create_bits_picture (pict, has_clip);
     }
     else if (pict->pSourcePict)
     {
@@ -453,22 +426,14 @@ image_from_pict_18 (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
 	    else if (sp->type == SourcePictTypeConical)
 		image = create_conical_gradient_image (gradient);
 	}
-	*xoff = *yoff = 0;
     }
     
     if (image)
-	set_image_properties (image, pict, has_clip, xoff, yoff);
+	set_image_properties (image, pict);
     
     return image;
 }
 
-pixman_image_t *
-image_from_pict (PicturePtr pict, Bool has_clip, Bool is_src)
-{
-    int xoff = 0, yoff = 0;
-    return image_from_pict_18(pict, has_clip, &xoff, &yoff);
-}
-
 void
 free_pixman_pict (PicturePtr pict, pixman_image_t *image)
 {
@@ -498,4 +463,3 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 
     return TRUE;
 }
-
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 5b5aeae..b1e1eff 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -40,8 +40,7 @@ fbAddTraps (PicturePtr	pPicture,
 	    int		ntrap,
 	    xTrap	*traps)
 {
-    int image_xoff, image_yoff;
-    pixman_image_t *image = image_from_pict_18 (pPicture, FALSE, &image_xoff, &image_yoff);
+    pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
 
     if (!image)
 	return;
@@ -57,8 +56,7 @@ fbRasterizeTrapezoid (PicturePtr    pPicture,
 		      int	    x_off,
 		      int	    y_off)
 {
-    int	mask_xoff, mask_yoff;
-    pixman_image_t *image = image_from_pict_18 (pPicture, FALSE, &mask_xoff, &mask_yoff);
+    pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
 
     if (!image)
 	return;
diff --git a/fb/wfbrename.h b/fb/wfbrename.h
index e9cdca8..73ee510 100644
--- a/fb/wfbrename.h
+++ b/fb/wfbrename.h
@@ -187,5 +187,4 @@
 #define fbZeroSegment wfbZeroSegment
 #define free_pixman_pict wfb_free_pixman_pict
 #define image_from_pict wfb_image_from_pict
-#define image_from_pict_18 wfb_image_from_pict_18
 #define composeFunctions wfbComposeFunctions
commit 63ef872068299aa2ea6bfd7d11935c222cc1e102
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Mar 16 11:40:53 2010 -0700

    Revert "XQuartz: Explicitly pass a bellProc to make XBell() work again."
    
    I'm not quite sure why this was necessary, but DDXRingBell is being called
    from CoreKeyboardBell, so we don't need a separate bellProc which would
    result in multiple rings.
    
    This reverts commit 7e7e7935eeb86b5990664a662471800cfd2e7ce0.
    
    Conflicts:
    
    	hw/xquartz/quartzKeyboard.c
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 7e36a9a..c9ef7cc 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -184,12 +184,6 @@ static void DarwinChangeKeyboardControl(DeviceIntPtr device, KeybdCtrl *ctrl) {
     // keyclick, bell volume / pitch, autorepead, LED's
 }
 
-static void DarwinKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) {
-    KeybdCtrl *ctrl = arg;
-
-    DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration);
-}
-
 //-----------------------------------------------------------------------------
 // Utility functions to help parse Darwin keymap
 //-----------------------------------------------------------------------------
@@ -301,7 +295,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
     // for a kIOHIDParamConnectType connection.
     assert(darwinParamConnect = NXOpenEventStatus());
 
-    InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
+    InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl);
 
     DarwinKeyboardReloadHandler();
 
commit 31292a7c775e4a249926140a86bc19c3805cdd96
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Wed Feb 10 15:52:14 2010 -0800

    XQuartz: Use an empty xkb keymap by default
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    (cherry picked from commit 5172253bae3b9867118c6717434e73c173acd5e9)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 30b8905..8b6ce62 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -45,6 +45,7 @@
 #include "site.h"
 #include "globals.h"
 #include "dix.h"
+#include "xkbsrv.h"
 
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
@@ -463,6 +464,11 @@ int DarwinParseModifierList(const char *constmodifiers, int separatelr)
  */
 void InitInput( int argc, char **argv )
 {
+    XkbRMLVOSet rmlvo = { .rules = "base", .model = "empty", .layout = "empty",
+                          .variant = NULL, .options = NULL };
+    /* We need to really have rules... or something... */
+    XkbSetRulesDflts(&rmlvo);
+
     darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE);
     RegisterKeyboardDevice( darwinKeyboard );
     darwinKeyboard->name = strdup("keyboard");
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 3b4eac3..7e36a9a 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -301,9 +301,6 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
     // for a kIOHIDParamConnectType connection.
     assert(darwinParamConnect = NXOpenEventStatus());
 
-    /* We need to really have rules... or something... */
-    //XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
-
     InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl);
 
     DarwinKeyboardReloadHandler();
@@ -775,12 +772,9 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 #endif
         }
 
-        // There seems to be an issue with this in 1.5+, shift-space is not
-        // producing space, it's sending NoSymbol... ?
-        //if (k[3] == k[2]) k[3] = NoSymbol;
-        //if (k[1] == k[0]) k[1] = NoSymbol;
-        //if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
-        //if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] = NoSymbol;
+        if (k[3] == k[2]) k[3] = NoSymbol;
+        if (k[1] == k[0]) k[1] = NoSymbol;
+        if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
     }
 
     /* Fix up some things that are normally missing.. */
@@ -791,7 +785,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 
             if    (k[0] == NoSymbol && k[1] == NoSymbol
                 && k[2] == NoSymbol && k[3] == NoSymbol)
-	      k[0] = k[1] = k[2] = k[3] = known_keys[i].keysym;
+	      k[0] = known_keys[i].keysym;
         }
     }
 
@@ -804,7 +798,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
             k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
 
             if (k[0] == known_numeric_keys[i].normal)
-                k[0] = k[1] = k[2] = k[3] = known_numeric_keys[i].keypad;
+                k[0] = known_numeric_keys[i].keypad;
         }
     }
 
commit 5b4fabb910eefb393eb3bfb45df5e63fdeb71f26
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Mar 15 08:44:01 2010 +1000

    configure: restore SHA1_LIB for XSERVER_SYS_LIBS
    
    Accidentally removed in ff5fb43a4b38c707a, caused by
    a botched merge when cherry-picking 178da6534fe7ab4b99fb.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index 2046157..c215b5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1326,7 +1326,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 #
 XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
 XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}"
 AC_SUBST([XSERVER_LIBS])
 AC_SUBST([XSERVER_SYS_LIBS])
 
commit 5a2b3f36a05d1e0fcfd1b0f85d6584478ba24eda
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 16:53:06 2010 +1000

    xserver 1.7.5.902
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index 9dca987..2046157 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.5.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-03-05"
+AC_INIT([xorg-server], 1.7.5.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-03-12"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit c25b34fe61cb3fc7c3583a8ccf62c470cc8ead06
Merge: 3ae6a37... ff5fb43...
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 16:37:28 2010 +1000

    Merge branch 'server-1.7-nominations' into server-1.7-branch

commit ff5fb43a4b38c707a1a9948ace621a62b5b2457a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 14:39:19 2010 +1000

    Xext: Link to external libraries when necessary.
    
    Although the DDX should be linked to the necessary libraries, we may
    also need to pull them in directly to the module to ensure the symbols
    are resolved at runtime. Should fix this bug with XSELINUX:
    
    /usr/bin/X: symbol lookup error:
    /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol:
    is_selinux_enabled
    
    -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from
         XSERVER_SYS_LIBS as it should only be needed in extmod.
    
    Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Eamon Walsh <ewalsh at tycho.nsa.gov>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit 178da6534fe7ab4b99fb87925c04e6f963c88583)
    
    Conflicts:
    
    	configure.ac

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index ac45f95..4f05ce9 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -32,6 +32,7 @@ BUILTIN_SRCS =			\
 
 # Sources always included in libXextmodule.la & libXext.la. That's right, zero.
 MODULE_SRCS =
+MODULE_LIBS =
 
 # Optional sources included if extension enabled by configure.ac rules
 
@@ -83,6 +84,7 @@ endif
 XSELINUX_SRCS = xselinux.c xselinux.h
 if XSELINUX
 MODULE_SRCS += $(XSELINUX_SRCS)
+MODULE_LIBS += $(SELINUX_LIBS)
 endif
 
 # Security extension: multi-level security to protect clients from each other
@@ -119,11 +121,13 @@ endif
 # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
 
 libXext_la_SOURCES =		$(BUILTIN_SRCS) $(MODULE_SRCS)
+libXext_la_LIBADD =		$(MODULE_LIBS)
 
 if XORG
 libXextbuiltin_la_SOURCES =	$(BUILTIN_SRCS)
 
 libXextmodule_la_SOURCES =	$(MODULE_SRCS)
+libXextmodule_la_LIBADD =	$(MODULE_LIBS)
 endif
 
 EXTRA_DIST = \
diff --git a/configure.ac b/configure.ac
index 08e444e..9dca987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1326,7 +1326,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 #
 XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
 XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB} ${SELINUX_LIBS}"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
 AC_SUBST([XSERVER_LIBS])
 AC_SUBST([XSERVER_SYS_LIBS])
 
commit a69c7a4c539f933df3f6aa5444cdde95e4d5698a
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Mar 11 14:19:04 2010 +0200

    Record: Avoid duplicates from replaying frozen events
    
    Reintroduce a check which used to be there in the old
    ProcessKeyboardEvent/ProcessPointerEvent codepath, which avoids us
    recording events subject to a grab twice: once when it's first processed
    in EnqueueEvent, and then again when it's thawed and being replayed.
    
    This required a tiny amount of code motion to expose syncEvents.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit a2ea8c2f2cc53607d57d60f41c879380ea70cd02)
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index a63b65b..e680f6f 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1051,7 +1051,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
             break;
     }
 
-    if (DeviceEventCallback) {
+    if (DeviceEventCallback && !syncEvents.playingEvents) {
 	DeviceEventInfoRec eventinfo;
 	SpritePtr pSprite = device->spriteInfo->sprite;
 
diff --git a/dix/events.c b/dix/events.c
index 02079be..3c625db 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -253,33 +253,7 @@ extern BOOL EventIsKeyRepeat(xEvent *event);
  */
 InputInfo inputInfo;
 
-/**
- * syncEvents is the global structure for queued events.
- *
- * Devices can be frozen through GrabModeSync pointer grabs. If this is the
- * case, events from these devices are added to "pending" instead of being
- * processed normally. When the device is unfrozen, events in "pending" are
- * replayed and processed as if they would come from the device directly.
- */
-static struct {
-    QdEventPtr		pending, /**<  list of queued events */
-                        *pendtail; /**< last event in list */
-    /** The device to replay events for. Only set in AllowEvents(), in which
-     * case it is set to the device specified in the request. */
-    DeviceIntPtr	replayDev;	/* kludgy rock to put flag for */
-
-    /**
-     * The window the events are supposed to be replayed on.
-     * This window may be set to the grab's window (but only when
-     * Replay{Pointer|Keyboard} is given in the XAllowEvents()
-     * request. */
-    WindowPtr		replayWin;	/*   ComputeFreezes            */
-    /**
-     * Flag to indicate whether we're in the process of
-     * replaying events. Only set in ComputeFreezes(). */
-    Bool		playingEvents;
-    TimeStamp		time;
-} syncEvents;
+EventSyncInfoRec syncEvents;
 
 /**
  * The root window the given device is currently on.
diff --git a/include/inputstr.h b/include/inputstr.h
index 29ad5a8..15184d0 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -557,4 +557,34 @@ typedef struct _QdEvent {
     InternalEvent	*event;
 } QdEventRec;
 
+/**
+ * syncEvents is the global structure for queued events.
+ *
+ * Devices can be frozen through GrabModeSync pointer grabs. If this is the
+ * case, events from these devices are added to "pending" instead of being
+ * processed normally. When the device is unfrozen, events in "pending" are
+ * replayed and processed as if they would come from the device directly.
+ */
+typedef struct _EventSyncInfo {
+    QdEventPtr          pending, /**<  list of queued events */
+                        *pendtail; /**< last event in list */
+    /** The device to replay events for. Only set in AllowEvents(), in which
+     * case it is set to the device specified in the request. */
+    DeviceIntPtr        replayDev;      /* kludgy rock to put flag for */
+
+    /**
+     * The window the events are supposed to be replayed on.
+     * This window may be set to the grab's window (but only when
+     * Replay{Pointer|Keyboard} is given in the XAllowEvents()
+     * request. */
+    WindowPtr           replayWin;      /*   ComputeFreezes            */
+    /**
+     * Flag to indicate whether we're in the process of
+     * replaying events. Only set in ComputeFreezes(). */
+    Bool                playingEvents;
+    TimeStamp           time;
+} EventSyncInfoRec, *EventSyncInfoPtr;
+
+extern EventSyncInfoRec syncEvents;
+
 #endif /* INPUTSTRUCT_H */
commit 3ae6a3779d9040a4d7c3e1b7901117e24e0d3ecf
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Mar 10 16:07:09 2010 +1000

    dri2: return FALSE not BadValue.
    
    With 1.7 if you try and send a DRI2Connect with this value set
    to anything but 0, the server will segfault due to the strlen
    in the function this returns to, since BadValue != FALSE.
    
    Fixed via other work in 1.8.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d15ced1..1cc7b63 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -387,7 +387,7 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
 	return FALSE;
 
     if (driverType != DRI2DriverDRI)
-	return BadValue;
+	return FALSE;
 
     *fd = ds->fd;
     *driverName = ds->driverName;


More information about the Xquartz-changes mailing list