[Xcb] splitting xcb/util

Michael Stapelberg michael+xcb at stapelberg.de
Fri Jul 16 13:34:08 PDT 2010

Hi Jamey,

With the code of the xcb-event being deleted in git, I was forced to
have a look at this. For my rewrite of i3lock (a screen locker based
on slock) using xcb, I did not use the xcb-event functions. So, the
result is http://code.stapelberg.de/git/i3lock/tree/i3lock.c?h=xcb#n327
and http://code.stapelberg.de/git/i3lock/tree/xcb.c?h=xcb#n30 (the
latter is kept out of i3lock.c because it’s ugly).

Excerpts from Jamey Sharp's message of 2010-06-25 07:29:03 +0200:
> I looked over the callers in awesome and i3-wm. I think in both cases,
> when they quit using the event and property libraries the code will
> both be clearer and faster.
What makes you think that? In the example posted above (i3lock), the
handling is relatively straight-forward as I only need to handle a
very small number of events, but still the code is quite ugly and
using xcb-event would have been easier. I can’t imagine the situation
being better in i3 itself. But maybe you have a good idea of how
your proposed clearer code could actually look like? :-)

Thanks for your answer,
Best regards,

More information about the Xcb mailing list