First post, by madewokherd
The Linux version of dosbox (0.71) does not set the InputHint flag of WM_HINTS as explained at http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.4
Summary: The InputHint flag tells the window manager whether a window has set the input setting. If the input setting is True, the window manager is allowed to set the keyboard focus to that window; if the input setting is False, the window manager is not allowed to do that.
So apparently that means it's undefined whether the window manager will assign keyboard focus to that window or not. I happen to use a window manager that does not do this (http://madewokherd.nfshost.com/luccawm). I don't want to change the general rule because what it's doing now makes more sense in other cases.
Dosbox should set the InputHint flag so that it can be sure that any ICCCM-compliant window manager will assign keyboard focus to it.
This can be tested using the xprop command. For xfce-terminal, which accepts keyboard focus, it outputs the following:
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x4000044
bitmap id # of mask for icon: 0x400004b
window id # of group leader: 0x4000001
For xclock it shows this:
WM_HINTS(WM_HINTS):
Client accepts input or input focus: False
Initial state is Normal State.
bitmap id # to use for icon: 0x4200001
bitmap id # of mask for icon: 0x4200003
And dosbox:
WM_HINTS(WM_HINTS):
bitmap id # to use for icon: 0x420000e
bitmap id # of mask for icon: 0x420000c
(There is no "Client accepts input or input focus:" line because dosbox does not specify that value.)
I plan to implement a work-around for the window manager I use based on class, but I hope you will fix this problem.