From 399954d40d6c9168a40a631e5a78d6d9b8063b58 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Tue, 11 Jan 2005 12:05:57 +0000 Subject: Do not grab ALT-TAB when window is in multiwindow mode --- hw/xwin/ChangeLog | 5 +++++ hw/xwin/winkeyhook.c | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) 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 + + * winkeyhook.c: + Do not grab ALT-TAB when window is in multiwindow mode + 2005-01-10 Alexander Gottwald * 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; -- cgit v1.2.3