summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-07-05 15:43:20 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-07-05 15:43:20 +0000
commit0bb2eb8eaaf4054fefbc45bf3cb47bbcf10b7cfd (patch)
tree93a832304b9002638cbc5748e9b2e50e42bb8a39
parent3af77ad3e754c4d419a1996ca73a9fd01f92388a (diff)
Fix problem with fake Control press on Alt-Gr
https://bugs.freedesktop.org/show_bug.cgi?id=3680 https://bugs.freedesktop.org/show_bug.cgi?id=3497 Fix static declaration of winGetBaseDir
-rw-r--r--hw/xwin/ChangeLog11
-rw-r--r--hw/xwin/InitOutput.c7
-rw-r--r--hw/xwin/winkeybd.c11
-rwxr-xr-xhw/xwin/winmultiwindowwndproc.c6
4 files changed, 27 insertions, 8 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 7ce672667..da4de0882 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,5 +1,16 @@
2005-07-05 Alexander Gottwald <ago at freedesktop dot org>
+ * winmultiwindowwndproc.c:
+ * winkeybd.c:
+ Fix problem with fake Control press on Alt-Gr
+ https://bugs.freedesktop.org/show_bug.cgi?id=3680
+ https://bugs.freedesktop.org/show_bug.cgi?id=3497
+
+ * InitOutput.c:
+ Fix static declaration of winGetBaseDir
+
+2005-07-05 Alexander Gottwald <ago at freedesktop dot org>
+
* winwindow.h:
* winmultiwindowwm.c:
* winscrinit.c:
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index ffa3e8596..c5242cc6f 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -129,6 +129,11 @@ winLogVersionInfo (void);
Bool
winValidateArgs (void);
+#ifdef RELOCATE_PROJECTROOT
+const char *
+winGetBaseDir(void);
+#endif
+
/*
* For the depth 24 pixmap we default to 32 bits per pixel, but
* we change this pixmap format later if we detect that the display
@@ -379,7 +384,7 @@ winCheckMount(void)
#endif
#ifdef RELOCATE_PROJECTROOT
-static const char *
+const char *
winGetBaseDir(void)
{
static BOOL inited = FALSE;
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 4b87340bc..e52337956 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -453,7 +453,7 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam)
* Fake Ctrl_L presses will be followed by an Alt_R keypress
* with the same timestamp as the Ctrl_L press.
*/
- if (message == WM_KEYDOWN
+ if ((message == WM_KEYDOWN || message == WM_SYSKEYDOWN)
&& wParam == VK_CONTROL
&& (HIWORD (lParam) & KF_EXTENDED) == 0)
{
@@ -464,7 +464,7 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam)
/* Look for fake Ctrl_L preceeding an Alt_R press. */
fReturn = PeekMessage (&msgNext, NULL,
- WM_KEYDOWN, WM_KEYDOWN,
+ WM_KEYDOWN, WM_SYSKEYDOWN,
PM_NOREMOVE);
/*
@@ -478,9 +478,11 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam)
/* Look for fake Ctrl_L preceeding an Alt_R press. */
fReturn = PeekMessage (&msgNext, NULL,
- WM_KEYDOWN, WM_KEYDOWN,
+ WM_KEYDOWN, WM_SYSKEYDOWN,
PM_NOREMOVE);
}
+ if (msgNext.message != WM_KEYDOWN && msgNext.message != WM_SYSKEYDOWN)
+ fReturn = 0;
/* Is next press an Alt_R with the same timestamp? */
if (fReturn && msgNext.wParam == VK_MENU
@@ -529,6 +531,9 @@ winIsFakeCtrl_L (UINT message, WPARAM wParam, LPARAM lParam)
PM_NOREMOVE);
}
+ if (msgNext.message != WM_KEYUP && msgNext.message != WM_SYSKEYUP)
+ fReturn = 0;
+
/* Is next press an Alt_R with the same timestamp? */
if (fReturn
&& (msgNext.message == WM_KEYUP
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 59f562cb3..50397d8b0 100755
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -720,16 +720,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
#endif
/* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
- return 0;
+ return winWindowProc(hwndScreen, message, wParam, lParam);
case WM_SYSKEYUP:
case WM_KEYUP:
/* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
- return 0;
+ return winWindowProc(hwndScreen, message, wParam, lParam);
case WM_HOTKEY: