hw/xwin: More closely follow ICCCM for setting input focus
authorJon TURNEY <jon.turney@dronecode.org.uk>
Thu, 27 Jun 2013 22:56:23 +0000 (23:56 +0100)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Mon, 3 Mar 2014 14:33:09 +0000 (14:33 +0000)
commitb634e909895f6001e7d9543e1350b20c82c8c01c
tree8643d6369d572b1ab111eacc0a7341ae0916aea2
parent0fc84a2bb6970f6b05a19cd8b32a7f3f7fd148b3
hw/xwin: More closely follow ICCCM for setting input focus

In multiwindow mode, more closely follow ICCCM section 4.1.7 when setting X
input focus to a window when the native Windows window acquires input focus:

- If InputHint is FALSE, don't use XSetInputFocus()
- If the window supports the WM_TAKE_FOCUS protocol, send a WM_TAKE_FOCUS message

This helps JDK 1.7 clients acquire the focus correctly.

Also, factor out checking client support for a given WM_PROTOCOLS protocol as a
separate function.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin/winmultiwindowwm.c