[Xcb] XDefineCursor equivalent?

Peter Harris git at peter.is-a-geek.org
Mon Mar 22 04:49:06 PDT 2010


On Mon, Mar 22, 2010 at 7:25 AM, Nicholas Allen wrote:
> I'm looking for the equivalent to Xlib's XDefineCursor function but
> can't seem to find it in XCB. I'm not 100% familiar with the X11
> protocol but would assume that this is a core protocol request as the X
> server needs to know what mouse cursor to display when the user moves
> the mouse over a window.
>
> Does anyone know how to do this with XCB?

I'm on the other side; I know the protocol, but I'm not too familiar
with Xlib. From reading the docs, it looks somewhat like XDefineCursor
is a wrapper/helper around XChangeWindowAttributes. If so, the XCB
function you want is xcb_change_window_attributes(XCB_CW_CURSOR).

xcb_aux_change_window_attributes from xcb/util/aux is a slightly more
Xlib-like version of the same thing, if you prefer.

Peter Harris


More information about the Xcb mailing list