aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
commit0874ae23a16946781dd517cfdb011c691ad0b581 (patch)
tree8de31864935e96a5e59b9fe6ceb12390bbc474cd /xorg-server/xfixes
parentd059ebdcb012228102f0b64f8cddf9464d5b625a (diff)
downloadvcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.gz
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.bz2
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.zip
svn merge -r571:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/xfixes')
-rw-r--r--xorg-server/xfixes/cursor.c23
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;
}