diff options
Diffstat (limited to 'xorg-server/xfixes/cursor.c')
-rw-r--r-- | xorg-server/xfixes/cursor.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 9fa2e85d1..a44356fe9 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -1056,11 +1056,15 @@ createInvisibleCursor (void) cm.xhot = 0;
cm.yhot = 0;
- AllocARGBCursor(psrcbits, pmaskbits,
- NULL, &cm,
- 0, 0, 0,
- 0, 0, 0,
- &pCursor, serverClient, (XID)0);
+ if (AllocARGBCursor(psrcbits, pmaskbits,
+ NULL, &cm,
+ 0, 0, 0,
+ 0, 0, 0,
+ &pCursor, serverClient, (XID)0) != Success)
+ return NullCursor;
+
+ if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer) pCursor))
+ return NullCursor;
return pCursor;
}
@@ -1093,12 +1097,9 @@ XFixesCursorInit (void) CursorWindowType = CreateNewResourceType(CursorFreeWindow,
"XFixesCursorWindow");
- if (pInvisibleCursor == NULL) {
- pInvisibleCursor = createInvisibleCursor();
- if (pInvisibleCursor == NULL) {
- return BadAlloc;
- }
- }
+ pInvisibleCursor = createInvisibleCursor();
+ if (pInvisibleCursor == NULL)
+ return BadAlloc;
return CursorClientType && CursorHideCountType && CursorWindowType;
}
|