summaryrefslogtreecommitdiff
path: root/hw/xwin
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
parentd365664c58919edb5e121a7c884384438df79776 (diff)
Do not grab ALT-TAB when window is in multiwindow mode
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/ChangeLog7
-rwxr-xr-xhw/xwin/winkeyhook.c24
2 files changed, 29 insertions, 2 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 4fd468f89..ca6c6f17b 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,4 +1,9 @@
-2005-01-10 Alexander Gottwald <ago at freedesktop dot org>
+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-11 Alexander Gottwald <ago at freedesktop dot org>
* winprefs.h:
Fix crash with not matching definitions of PATH_MAX
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;