aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwndproc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-26 09:34:42 +0100
committermarha <marha@users.sourceforge.net>2012-01-26 09:34:42 +0100
commit6dff1084f0e0ea54d1b78ef8ba24df6bbc8fd68d (patch)
tree91b4fa0e3a27460a4123fe11fa250a92f5ba3b60 /xorg-server/hw/xwin/winmultiwindowwndproc.c
parentd99165260070ce9668f3eeac8bb010393f490c0a (diff)
downloadvcxsrv-6dff1084f0e0ea54d1b78ef8ba24df6bbc8fd68d.tar.gz
vcxsrv-6dff1084f0e0ea54d1b78ef8ba24df6bbc8fd68d.tar.bz2
vcxsrv-6dff1084f0e0ea54d1b78ef8ba24df6bbc8fd68d.zip
In multiwindow mode, don't grab native input focus for new windows which
hint they don't want it
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index f4313d353..3142776b5 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -886,7 +886,22 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
& ~WS_CAPTION & ~WS_SIZEBOX);
winUpdateWindowPosition (hwnd, FALSE, &zstyle);
- SetForegroundWindow (hwnd);
+
+ {
+ WinXWMHints hints;
+ if (winMultiWindowGetWMHints(pWin, &hints))
+ {
+ /*
+ Give the window focus, unless it has an InputHint
+ which is FALSE (this is used by e.g. glean to
+ avoid every test window grabbing the focus)
+ */
+ if (!((hints.flags & InputHint) && (!hints.input)))
+ {
+ SetForegroundWindow (hwnd);
+ }
+ }
+ }
}
wmMsg.msg = WM_WM_MAP3;
}