I'd like to write my own simple version of xbindkeys in order to catch
and handle Button10~12 presses and releases (my tablet pc is sending
these when "clicking" certain offscreen areas). I've read xbindkeys
sources and I have a question.

Firstly I tried to do grabbing by myself only to find out that metacity
is adding borders to an InputOnly window. I understand that typically
I'd have to send proper WM hints to have borderless window, but is there
any use for InputOnly window with WM border?

Also I somehow could not grab button presses into this window. I was
rarelly getting them (once in twenty, thirty clicks). This made me think
I am doing something conceptually wrong, so I started reading xbindkeys

xbindkeys doesn't open its own InputOnly window but reuses the display's
root window. This looks weird to me, as I thought I shouldn't mess with
the root window if I don't have. Is this normal trick for grabbing
buttons for whole desktop? Could anyone describe how is it working?
I read Tronche's xlib manual and several other websites, but I've seen
no explanations. I'd be grateful for one.

Thank you,

Tomasz Melcer