diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2005-01-11 12:05:57 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2005-01-11 12:05:57 +0000 |
commit | 399954d40d6c9168a40a631e5a78d6d9b8063b58 (patch) | |
tree | efeb1772bc4de948032b95c9fa362a87d880c80b | |
parent | 9157890bc1817170a0747a1b921a34c03e0cb0cd (diff) |
Do not grab ALT-TAB when window is in multiwindow mode
-rw-r--r-- | hw/xwin/ChangeLog | 5 | ||||
-rwxr-xr-x | hw/xwin/winkeyhook.c | 24 |
2 files changed, 28 insertions, 1 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog index 9694e452d..63f91ce53 100644 --- a/hw/xwin/ChangeLog +++ b/hw/xwin/ChangeLog @@ -1,3 +1,8 @@ +2005-01-11 Alexander Gottwald <ago at freedesktop dot org> + + * winkeyhook.c: + Do not grab ALT-TAB when window is in multiwindow mode + 2005-01-10 Alexander Gottwald <ago at freedesktop dot org> * winkeybd.h diff --git a/hw/xwin/winkeyhook.c b/hw/xwin/winkeyhook.c index edc51c99f..cd54af23b 100755 --- a/hw/xwin/winkeyhook.c +++ b/hw/xwin/winkeyhook.c @@ -64,8 +64,29 @@ static LRESULT CALLBACK winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam) { BOOL fPassKeystroke = FALSE; + BOOL fPassAltTab = TRUE; PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam; HWND hwnd = GetActiveWindow(); +#ifdef XWIN_MULTIWINDOW + WindowPtr pWin = NULL; + winPrivWinPtr pWinPriv = NULL; + winPrivScreenPtr pScreenPriv = NULL; + winScreenInfo *pScreenInfo = NULL; + + /* Check if the Windows window property for our X window pointer is valid */ + if ((pWin = GetProp (hwnd, WIN_WINDOW_PROP)) != NULL) + { + /* Get a pointer to our window privates */ + pWinPriv = winGetWindowPriv(pWin); + + /* Get pointers to our screen privates and screen info */ + pScreenPriv = pWinPriv->pScreenPriv; + pScreenInfo = pScreenPriv->pScreenInfo; + + if (pScreenInfo->fMultiWindow) + fPassAltTab = FALSE; + } +#endif /* Pass keystrokes on to our main message loop */ if (iCode == HC_ACTION) @@ -79,7 +100,8 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam) case WM_KEYDOWN: case WM_SYSKEYDOWN: case WM_KEYUP: case WM_SYSKEYUP: fPassKeystroke = - ((p->vkCode == VK_TAB) && ((p->flags & LLKHF_ALTDOWN) != 0)) + (fPassAltTab && + (p->vkCode == VK_TAB) && ((p->flags & LLKHF_ALTDOWN) != 0)) || (p->vkCode == VK_LWIN) || (p->vkCode == VK_RWIN) ; break; |