[xmonad] Respecting the Window Manager Input Hint

Bas van Dijk v.dijk.bas at gmail.com
Wed Feb 3 05:57:31 EST 2010


Hello,

I'm developing a scientific instrument which runs Gentoo Linux and
uses Haskell for running the measurements. The device also uses XMonad
for window management. Because the device has a touchscreen instead of
a physical keyboard, I would like to use the the on-screen-keyboard:
onboard [1].

The way onboard is supposed to work is that you move the focus to the
window that needs input and then click on one of the onboard keys.
Onboard will then generate an X11 event that will be send to the
window that has focus.

For correct operation, it's crucial that onboard does not get focus
itself because then the key events will be send to itself! To prevent
getting focus, onboard gives a hint to the window manager to not
accept focus.

$ xprop     # (click on the onboard window)
...
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
...

Unfortunately xmonad does not respect this hint by focusing the
onboard window anyway when my pointer enters it.

How can I prevent this?

Possible solutions:

* Use a manage hook that removes onboard from xmonad management so
that it won't get focus anymore:
className =? "Onboard" --> doIgnore
While this solves my problem this has the disadvantage that the
onboard window is not managed anymore.

* Use XMonad.Layout.BoringWindows and the code in the recent thread on
"focus handling". Unfortunately I didn't get this to work. (Maybe I
have to put some more time into this)

* Patch xmonad to respect the Window Manager Input Hint by not giving
focus to windows that don't want't to get focus.
How difficult would this be?

regards,

Bas

[1] https://wiki.ubuntu.com/Accessibility/Projects/onBoard


More information about the xmonad mailing list