Lukas Hejtmanek wrote:
> On Wed, Dec 31, 2008 at 06:12:34PM -0500, Eamon Walsh wrote:
>   
>> devPrivates pointer.  If I knew what the exact sequence of gimp
>> operations were I could attempt to reproduce the problem.  If the
>>     
>
> I opened an image, created a text, pulled down horizontal guide line to the 
> text
> baseline, created another text and align it with the guide line. At this
> point, the Xserver crashes. Repetitilevy.
>
>   

Can you try the attached patch to see if it solves the problem?





-- 
Eamon Walsh <[email protected]>
National Security Agency

diff --git a/dix/cursor.c b/dix/cursor.c
index b91c194..93a66b4 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -100,7 +100,6 @@ FreeCursorBits(CursorBitsPtr bits)
 	    CloseFont(this->font, (Font)0);
 	    xfree(this);
 	}
-	dixFreePrivates(bits->devPrivates);
 	xfree(bits);
     }
 }
@@ -198,9 +197,9 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
     bits->xhot = cm->xhot;
     bits->yhot = cm->yhot;
     pCurs->refcnt = 1;		
-    bits->devPrivates = NULL;
     bits->refcnt = -1;
     CheckForEmptyMask(bits);
+
     pCurs->bits = bits;
 #ifdef XFIXES
     pCurs->serialNumber = ++cursorSerial;
@@ -399,7 +398,6 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
 	bits->height = cm.height;
 	bits->xhot = cm.xhot;
 	bits->yhot = cm.yhot;
-	bits->devPrivates = NULL;
 	if (sourcefont != maskfont)
 	    bits->refcnt = -1;
 	else
diff --git a/include/cursorstr.h b/include/cursorstr.h
index 3ff56e2..97421d8 100644
--- a/include/cursorstr.h
+++ b/include/cursorstr.h
@@ -64,7 +64,7 @@ typedef struct _CursorBits {
     Bool emptyMask;				/* all zeros mask */
     unsigned short width, height, xhot, yhot;	/* metrics */
     int refcnt;					/* can be shared */
-    PrivateRec *devPrivates;			/* set by pScr->RealizeCursor*/
+    pointer devPriv[MAXSCREENS];		/* set by pScr->RealizeCursor*/
 #ifdef ARGB_CURSOR
     CARD32 *argb;				/* full-color alpha blended */
 #endif
diff --git a/mi/midispcur.c b/mi/midispcur.c
index e73b500..0853ce8 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -178,7 +178,7 @@ static Bool
 miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
 {
     if (pCursor->bits->refcnt <= 1)
-	dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), NULL);
+	pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL;
     return TRUE;
 }
 
@@ -277,7 +277,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
 	    xfree ((pointer) pPriv);
 	    return (miDCCursorPtr)NULL;
 	}
-	dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv);
+	pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv;
 	return pPriv;
     }
     pPriv->pPicture = 0;
@@ -295,7 +295,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
 	xfree ((pointer) pPriv);
 	return (miDCCursorPtr)NULL;
     }
-    dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv);
+    pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv;
 
     /* create the two sets of bits, clipping as appropriate */
 
@@ -339,8 +339,7 @@ miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
 {
     miDCCursorPtr   pPriv;
 
-    pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
-					    CursorScreenKey(pScreen));
+    pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum];
     if (pPriv && (pCursor->bits->refcnt <= 1))
     {
 	if (pPriv->sourceBits)
@@ -352,7 +351,7 @@ miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
 	    FreePicture (pPriv->pPicture, 0);
 #endif
 	xfree ((pointer) pPriv);
-	dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), NULL);
+	pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL;
     }
     return TRUE;
 }
@@ -445,8 +444,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
     miDCBufferPtr   pBuffer;
     WindowPtr	    pWin;
 
-    pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
-					    CursorScreenKey(pScreen));
+    pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum];
     if (!pPriv)
     {
 	pPriv = miDCRealize(pScreen, pCursor);
@@ -755,8 +753,7 @@ miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
     XID		    gcval = FALSE;
     PixmapPtr	    pTemp;
 
-    pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
-					    CursorScreenKey(pScreen));
+    pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum];
     if (!pPriv)
     {
 	pPriv = miDCRealize(pScreen, pCursor);
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to