[Xcb] fonts and cursors
Vincent Torri
vtorri at univ-evry.fr
Wed Sep 13 01:38:51 PDT 2006
Hey,
on irc, etzel asked me how to change the cursors of a window. In
addition, I would like to add that stuff in the tutorial. I've looked a
bit in the Xlib code to see how it works and i wrote that code :
font = XCBFONTNew (conn);
XCBOpenFont (conn, font, strlen ("XC_hand1"), "XC_hand1");
cursor = XCBCURSORNew (conn);
XCBCreateGlyphCursor (conn, cursor, font, font,
58, 58 + 1,
255, 0, 0,
0, 255, 0);
mask = XCBCWCursor;
value_list = cursor.xid;
XCBChangeWindowAttributes (conn, window, mask, &value_list);
I have chosen the name of the font thanks to Mr Tronche :
http://www.the-labs.com/X11/XLib-Manual/appendix/b/
58 being what seems to be the number defining XC_hand1
Of course, it does not work.
Does someone know what the problem is ? Are the cursor names given in the
link above correct ?
thank you
Vincent
More information about the Xcb
mailing list