summaryrefslogtreecommitdiff
path: root/dix/cursor.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-08-12 15:31:10 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-08-12 15:31:10 +0930
commitf367285fd5825e0adc271982a529c9904ad65c89 (patch)
tree4e7081da773c51cc9448cefe17c2c3639f33ad6d /dix/cursor.c
parentb1272eefd9a3e340d65c14903f337747ec82d021 (diff)
parentff4bd3addb48df3eacc4b121cc249a7f38eb981a (diff)
Merge branch 'master' into mpx
Conflicts: Xi/exevents.c dix/devices.c dix/getevents.c include/dix.h mi/mieq.c
Diffstat (limited to 'dix/cursor.c')
-rw-r--r--dix/cursor.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/dix/cursor.c b/dix/cursor.c
index 709c71dd2..917dc690c 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -497,25 +497,41 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
*************************************************************/
CursorPtr
-CreateRootCursor(char *pfilename, unsigned glyph)
+CreateRootCursor(char *unused1, unsigned int unused2)
{
CursorPtr curs;
+#ifdef NULL_ROOT_CURSOR
+ CursorMetricRec cm;
+#else
FontPtr cursorfont;
int err;
XID fontID;
+#endif
+
+#ifdef NULL_ROOT_CURSOR
+ cm.width = 0;
+ cm.height = 0;
+ cm.xhot = 0;
+ cm.yhot = 0;
+ curs = AllocCursor(NULL, NULL, &cm, 0, 0, 0, 0, 0, 0);
+
+ if (curs == NullCursor)
+ return NullCursor;
+#else
fontID = FakeClientID(0);
err = OpenFont(serverClient, fontID, FontLoadAll | FontOpenSync,
- (unsigned)strlen( pfilename), pfilename);
+ (unsigned)strlen(defaultCursorFont), defaultCursorFont);
if (err != Success)
return NullCursor;
cursorfont = (FontPtr)LookupIDByType(fontID, RT_FONT);
if (!cursorfont)
return NullCursor;
- if (AllocGlyphCursor(fontID, glyph, fontID, glyph + 1,
+ if (AllocGlyphCursor(fontID, 0, fontID, 1,
0, 0, 0, ~0, ~0, ~0, &curs, serverClient) != Success)
return NullCursor;
+#endif
if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer)curs))
return NullCursor;