aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/cursor.c')
-rw-r--r--xorg-server/dix/cursor.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c
index 0017c661d..086d008e0 100644
--- a/xorg-server/dix/cursor.c
+++ b/xorg-server/dix/cursor.c
@@ -110,7 +110,7 @@ FreeCursorBits(CursorBitsPtr bits)
*
* \param value must conform to DeleteType
*/
-_X_EXPORT int
+int
FreeCursor(pointer value, XID cid)
{
int nscr;
@@ -345,7 +345,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
unsigned char *mskptr;
n = BitmapBytePad(cm.width)*(long)cm.height;
- mskptr = mskbits = (unsigned char *)xalloc(n);
+ mskptr = mskbits = xalloc(n);
if (!mskptr)
return BadAlloc;
while (--n >= 0)
@@ -405,7 +405,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
else
{
bits->refcnt = 1;
- pShare = (GlyphSharePtr)xalloc(sizeof(GlyphShare));
+ pShare = xalloc(sizeof(GlyphShare));
if (!pShare)
{
FreeCursorBits(bits);
@@ -515,7 +515,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
* add the cursor to the resource table
*************************************************************/
-CursorPtr
+CursorPtr
CreateRootCursor(char *unused1, unsigned int unused2)
{
CursorPtr curs;
@@ -545,8 +545,9 @@ CreateRootCursor(char *unused1, unsigned int unused2)
if (err != Success)
return NullCursor;
- cursorfont = (FontPtr)LookupIDByType(fontID, RT_FONT);
- if (!cursorfont)
+ err = dixLookupResourceByType((pointer *)&cursorfont, fontID, RT_FONT,
+ serverClient, DixReadAccess);
+ if (err != Success)
return NullCursor;
if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0,
&curs, serverClient, (XID)0) != Success)