Do not specify XNFocusWindow to XCreateIC.
The previously used value - the background window - was simply wrong: not only did it never receive events (as the grab is on the root window), it also is not a child of the client window but it should be as per Xlib Programming Manual.
parent
fe61593a
Please register or sign in to comment