Alexander Suraphel
Alexander Suraphel

Reputation: 10613

Where to learn X11 and XCB?

I want to create a software that requires X11 render window that is stacked on the top and grabs the keyboard and mouse(just like a screen locker) but all I could find was a shallow documentation with very few examples. How shall I proceed?

Upvotes: 4

Views: 5679

Answers (2)

Felipe Tonello
Felipe Tonello

Reputation: 320

There is no such a thing X11 or XCB. They are different things. X11 is the protocol, XCB is a C library which implements the low-level protocol calls to the X server. Perhaps you were referring to Xlib or libX11 instead of X11 alone.

I would recommend you to read Xlib documentation, you can learn a lot about the X11 protocol. Then you can easily switch to XCB, which is highly recommended, by reading their documentation. Check xcb/xproto.h to find all X11 protocol calls.

It's also interesting to read about ICCCM and EWMH standards.

Upvotes: 7

Alexander Suraphel
Alexander Suraphel

Reputation: 10613

After researching for a little a while, I decided to answer the question myself.

The the X11 manual at sbin.com is a very good one and contains detailed explanation and examples.

I also found the folks at #xcb irc challel at irc.freenode.com very cooperative and knowledgeable. They suggested me to read code written in X11 like xscreensaver and others. That should get me started.

Upvotes: 7

Related Questions