aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwndproc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-28 13:55:41 +0100
committermarha <marha@users.sourceforge.net>2012-01-28 13:55:41 +0100
commit1aee8dafb5391e093f3a111f906ab0d8b6775510 (patch)
tree3fd4cc1783510fb6ce17c4c42b4d012014008e5b /xorg-server/hw/xwin/winmultiwindowwndproc.c
parentc6a1477b0092762299491d79b3a8cb094c6456da (diff)
downloadvcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.gz
vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.bz2
vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.zip
mesa xserver git update 28 jan 2012
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 3d23e9746..19dad579c 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -713,9 +713,11 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Remove our keyboard hook if it is installed */
winRemoveKeyboardHookLL ();
- if (!wParam)
- /* Revert the X focus as well, but only if the Windows focus is going to another window */
- DeleteWindowFromAnyEvents(pWin, FALSE);
+
+ /* Revert the X focus as well, but only if the Windows focus is going to another window */
+ if (!wParam && pWin)
+ DeleteWindowFromAnyEvents(pWin, FALSE);
+
return 0;
case WM_SYSDEADCHAR:
@@ -898,7 +900,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;
}