When I tried to add some stuff to the code, I came up with the problem of bringing windows to front if they are clicked with the left mouse button. I tried to use a global grab and then resend the events, but either I have done something wrong or there is another way to achive this behaviour.
]]>is there even an xlib interface for things like that?
If there isn't, you gotta write it yourself too!!
]]>