diff options
| author | Andrew Innes | 1999-01-27 21:53:27 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-01-27 21:53:27 +0000 |
| commit | 576ba81cd4e54cb648718b64294b967ee299dfb6 (patch) | |
| tree | ff98b25cd304695b049beb27ae3814d006b2c5b4 /src | |
| parent | 27d3ec7f872059482c2f01fa62ad3f126b6c0ffe (diff) | |
| download | emacs-576ba81cd4e54cb648718b64294b967ee299dfb6.tar.gz emacs-576ba81cd4e54cb648718b64294b967ee299dfb6.zip | |
(w32_wnd_proc): Fix bug introduced by previous change;
the lwindow, rwindow and apps keys could not be used as function
keys, because they were being passed to TranslateMessage which
ignores them. Also, key was being changed to SPC.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 4ffeb2bfc28..10afcbca40a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3656,6 +3656,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3656 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 3656 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 3657 | W32Msg wmsg; | 3657 | W32Msg wmsg; |
| 3658 | int windows_translate; | 3658 | int windows_translate; |
| 3659 | int key; | ||
| 3659 | 3660 | ||
| 3660 | /* Note that it is okay to call x_window_to_frame, even though we are | 3661 | /* Note that it is okay to call x_window_to_frame, even though we are |
| 3661 | not running in the main lisp thread, because frame deletion | 3662 | not running in the main lisp thread, because frame deletion |
| @@ -3757,9 +3758,16 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3757 | if (dpyinfo->faked_key == wParam) | 3758 | if (dpyinfo->faked_key == wParam) |
| 3758 | { | 3759 | { |
| 3759 | dpyinfo->faked_key = 0; | 3760 | dpyinfo->faked_key = 0; |
| 3760 | /* Make sure TranslateMessage sees them though. */ | 3761 | /* Make sure TranslateMessage sees them though (as long as |
| 3761 | windows_translate = 1; | 3762 | they don't produce WM_CHAR messages). This ensures that |
| 3762 | goto translate; | 3763 | indicator lights are toggled promptly on Windows 9x, for |
| 3764 | example. */ | ||
| 3765 | if (lispy_function_keys[wParam] != 0) | ||
| 3766 | { | ||
| 3767 | windows_translate = 1; | ||
| 3768 | goto translate; | ||
| 3769 | } | ||
| 3770 | return 0; | ||
| 3763 | } | 3771 | } |
| 3764 | 3772 | ||
| 3765 | /* Synchronize modifiers with current keystroke. */ | 3773 | /* Synchronize modifiers with current keystroke. */ |
| @@ -3780,16 +3788,15 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3780 | if (GetAsyncKeyState (wParam) & 1) | 3788 | if (GetAsyncKeyState (wParam) & 1) |
| 3781 | { | 3789 | { |
| 3782 | if (NUMBERP (Vw32_phantom_key_code)) | 3790 | if (NUMBERP (Vw32_phantom_key_code)) |
| 3783 | wParam = XUINT (Vw32_phantom_key_code) & 255; | 3791 | key = XUINT (Vw32_phantom_key_code) & 255; |
| 3784 | else | 3792 | else |
| 3785 | wParam = VK_SPACE; | 3793 | key = VK_SPACE; |
| 3786 | dpyinfo->faked_key = wParam; | 3794 | dpyinfo->faked_key = key; |
| 3787 | keybd_event (wParam, (BYTE) MapVirtualKey (wParam, 0), 0, 0); | 3795 | keybd_event (key, (BYTE) MapVirtualKey (key, 0), 0, 0); |
| 3788 | } | 3796 | } |
| 3789 | } | 3797 | } |
| 3790 | if (!NILP (Vw32_lwindow_modifier)) | 3798 | if (!NILP (Vw32_lwindow_modifier)) |
| 3791 | return 0; | 3799 | return 0; |
| 3792 | windows_translate = 1; | ||
| 3793 | break; | 3800 | break; |
| 3794 | case VK_RWIN: | 3801 | case VK_RWIN: |
| 3795 | if (NILP (Vw32_pass_rwindow_to_system)) | 3802 | if (NILP (Vw32_pass_rwindow_to_system)) |
| @@ -3797,21 +3804,19 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3797 | if (GetAsyncKeyState (wParam) & 1) | 3804 | if (GetAsyncKeyState (wParam) & 1) |
| 3798 | { | 3805 | { |
| 3799 | if (NUMBERP (Vw32_phantom_key_code)) | 3806 | if (NUMBERP (Vw32_phantom_key_code)) |
| 3800 | wParam = XUINT (Vw32_phantom_key_code) & 255; | 3807 | key = XUINT (Vw32_phantom_key_code) & 255; |
| 3801 | else | 3808 | else |
| 3802 | wParam = VK_SPACE; | 3809 | key = VK_SPACE; |
| 3803 | dpyinfo->faked_key = wParam; | 3810 | dpyinfo->faked_key = key; |
| 3804 | keybd_event (wParam, (BYTE) MapVirtualKey (wParam, 0), 0, 0); | 3811 | keybd_event (key, (BYTE) MapVirtualKey (key, 0), 0, 0); |
| 3805 | } | 3812 | } |
| 3806 | } | 3813 | } |
| 3807 | if (!NILP (Vw32_rwindow_modifier)) | 3814 | if (!NILP (Vw32_rwindow_modifier)) |
| 3808 | return 0; | 3815 | return 0; |
| 3809 | windows_translate = 1; | ||
| 3810 | break; | 3816 | break; |
| 3811 | case VK_APPS: | 3817 | case VK_APPS: |
| 3812 | if (!NILP (Vw32_apps_modifier)) | 3818 | if (!NILP (Vw32_apps_modifier)) |
| 3813 | return 0; | 3819 | return 0; |
| 3814 | windows_translate = 1; | ||
| 3815 | break; | 3820 | break; |
| 3816 | case VK_MENU: | 3821 | case VK_MENU: |
| 3817 | if (NILP (Vw32_pass_alt_to_system)) | 3822 | if (NILP (Vw32_pass_alt_to_system)) |