summaryrefslogtreecommitdiff
path: root/hw/xwin/winkeyhook.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-11 12:03:34 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-11 12:03:34 +0000
commit27fc6874b34d70a7ddae5ed8f516f6cfaab518b8 (patch)
tree3ab15649c372ed1f09149d51819c5e9c3037f3f4 /hw/xwin/winkeyhook.c
parentd365664c58919edb5e121a7c884384438df79776 (diff)
Do not grab ALT-TAB when window is in multiwindow mode
Diffstat (limited to 'hw/xwin/winkeyhook.c')
-rwxr-xr-xhw/xwin/winkeyhook.c24
1 files changed, 23 insertions, 1 deletions
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;