[PATCH] ephyr: Properly implement hardware cursors (v2)

Adam Jackson ajax at redhat.com
Tue Sep 16 07:47:56 PDT 2014


On Thu, 2014-09-11 at 18:13 -0700, Keith Packard wrote:
> Adam Jackson <ajax at redhat.com> writes:
> > +    cursor_pxm = xcb_generate_id(HostX.conn);
> > +    xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1);
> > +    HostX.empty_cursor = xcb_generate_id(HostX.conn);
> > +    xcb_create_cursor(HostX.conn,
> > +                      HostX.empty_cursor,
> > +                      cursor_pxm, cursor_pxm,
> > +                      0,0,0,
> > +                      0,0,0,
> > +                      1,1);
> > +    xcb_free_pixmap(HostX.conn, cursor_pxm);
> 
> Sadly, pixmap contents are not defined on creation. So, you'll have to
> actually clear this thing. Create a GC, set foreground to zero and fill
> rectangle (or draw a point; it's all the same :-)

I refuse to take the blame for code I merely outdented, but I suppose I
do still need to fix it.  v3 in a moment.

- ajax



More information about the xorg-devel mailing list