Search code examples
xlibwindow-managers

Xlib - focus mode


I'm writing a simple window manager (using xlib) for school and I have one problem. I really don't like the default X11 focus mode: 'sloppy focus' (the focus follows the mouse pointer) so I want to change that behavior.

I'm overriding the EnterNotify event but I still have sloppy focus. Can someone please show me the right direction?

Thanks


Solution

  • I found the solution. Just use XSetInputFocus() to set the focus to any window, and the sloppy focus disappears.