[PATCH] ConsoleKit without gtk dependencies

Michael Biebl mbiebl at gmail.com
Sat Mar 31 08:33:34 PDT 2007


2007/3/31, Rémi Cardona <remi at gentoo.org>:
> William Jon McCann wrote:
> > On 3/29/07, Michael Biebl <mbiebl at gmail.com> wrote:
> >> I rewrote the functionality with plain Xlib.
> >>
> >> Please review and comment.
> >
> > That's a good idea.  In fact I already did that a few days ago.  But I
> > forgot to push out the change.  Sorry about that, I guess I'm still
> > used to the one step commits of cvs/svn/etc.
> >
> > http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=commit;h=a2b51f00af2143a90138c6ce1df1e7e9b4ec8afa
> >
> >
> > Anyway, thanks for the patch.
>
> Just an idea : could this be rewritten using xcb instead? As the
> commitdiff seems small enough, maybe both xcb and Xlib could be used?
>
> Since I have never done any core X programming, I don't know how hard it
> would be.


The necessary code changes would be trivial:
..
#include <xcb/xcb.h>
..
main() {
..
  xcb_connection_t *c;
  c = xcb_connect (NULL, NULL);
  fd = xcb_get_file_descriptor (c);
  ..
  xcb_disconnect (c);
  return ret;
}

And instead of linking against X11, you have to link against xcb (xcb
uses pkg-config, so it would be easy).
This is actually a much light weighter dependency (libX11: 945kb, libxcb: 92kb).

Cheers,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the hal mailing list