summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-10 13:13:08 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-01-10 13:13:08 +0000
commit57387e115caf5a4b9501cc8f6ddeb1946b0e6547 (patch)
tree0d0362d4ea2237d49e7ef016353d109f20f75fd6 /hw/xwin
parentf417159e51afe22de7d4e6ba9f154313c6af59bc (diff)
winkeybd.h
winkeyhook.c Make keyhook feature work in multiwindowmode too Hook windows keys
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/ChangeLog8
-rw-r--r--hw/xwin/winkeybd.h6
-rwxr-xr-xhw/xwin/winkeyhook.c5
-rw-r--r--hw/xwin/winwndproc.c4
4 files changed, 15 insertions, 8 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index e0970a7b0..39b59c1dd 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-10 Alexander Gottwald <ago at freedesktop dot org>
+
+ * winkeybd.h
+ * winkeyhook.c
+ * winwndproc.c:
+ Make keyhook feature work in multiwindowmode too
+ Hook windows keys
+
2005-01-08 Alexander Gottwald <ago at freedesktop dot org>
* winblock.c:
diff --git a/hw/xwin/winkeybd.h b/hw/xwin/winkeybd.h
index f320c98e7..31c0cbc23 100644
--- a/hw/xwin/winkeybd.h
+++ b/hw/xwin/winkeybd.h
@@ -140,9 +140,9 @@ g_iKeyMap [] = {
/* 88 */ 0, 0, 0,
/* 89 */ 0, 0, 0,
/* 90 */ 0, 0, 0,
- /* 91 */ 0, 0, 0,
- /* 92 */ 0, 0, 0,
- /* 93 */ 0, 0, 0,
+ /* 91 */ VK_LWIN, KEY_LMeta, 0,
+ /* 92 */ VK_RWIN, KEY_RMeta, 0,
+ /* 93 */ VK_APPS, KEY_Menu, 0,
/* 94 */ 0, 0, 0,
/* 95 */ 0, 0, 0,
/* 96 */ 0, 0, 0,
diff --git a/hw/xwin/winkeyhook.c b/hw/xwin/winkeyhook.c
index 60176d9ad..edc51c99f 100755
--- a/hw/xwin/winkeyhook.c
+++ b/hw/xwin/winkeyhook.c
@@ -65,6 +65,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam)
{
BOOL fPassKeystroke = FALSE;
PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam;
+ HWND hwnd = GetActiveWindow();
/* Pass keystrokes on to our main message loop */
if (iCode == HC_ACTION)
@@ -79,9 +80,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam)
case WM_KEYUP: case WM_SYSKEYUP:
fPassKeystroke =
((p->vkCode == VK_TAB) && ((p->flags & LLKHF_ALTDOWN) != 0))
-#if 0
|| (p->vkCode == VK_LWIN) || (p->vkCode == VK_RWIN)
-#endif
;
break;
}
@@ -107,7 +106,7 @@ winKeyboardMessageHookLL (int iCode, WPARAM wParam, LPARAM lParam)
lParamKey = lParamKey | (0x80000000 & ((p->flags & LLKHF_UP) << 24));
/* Send message to our main window that has the keyboard focus */
- PostMessage (g_hwndKeyboardFocus,
+ PostMessage (hwnd,
(UINT) wParam,
(WPARAM) p->vkCode,
lParamKey);
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 67fc8d356..1c5fc2adf 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -1013,7 +1013,7 @@ winWindowProc (HWND hwnd, UINT message,
* be returned to Windows. We may be able to trap the Windows keys,
* but we should determine if that is desirable before doing so.
*/
- if (wParam == VK_LWIN || wParam == VK_RWIN)
+ if ((wParam == VK_LWIN || wParam == VK_RWIN) && !g_fKeyboardHookLL)
break;
#ifdef XKB
@@ -1054,7 +1054,7 @@ winWindowProc (HWND hwnd, UINT message,
* be returned to Windows. We may be able to trap the Windows keys,
* but we should determine if that is desirable before doing so.
*/
- if (wParam == VK_LWIN || wParam == VK_RWIN)
+ if ((wParam == VK_LWIN || wParam == VK_RWIN) && !g_fKeyboardHookLL)
break;
/* Ignore the fake Ctrl_L that follows an AltGr release */