[Xcb] Mouse pointer and window focusing

Viet Nguyen afelion at gmail.com
Fri Sep 16 21:06:37 PDT 2011


Hi,
I am writing a tiling window manager based on XCB (just for studying).
Currently, my only problem is when I change focus by keyboard, I have
to move the mouse pointer to that window too.
xcb_warp_pointer
xcb_set_input_focus

In window 1, I handle key press, then set input to the window 2. But
if the mouse pointer is on the second window, events I received are:
1. focus out win 1
2. focus in win 2
3. key press
...

I do not know why focus in happened before key press, it seems the
window under the mouse pointer is automatically focused. How can I
disable this behaviour?

Thanks in advance.
-- 
Nguyen Quoc Viet


More information about the Xcb mailing list