aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2006-03-11 23:46:27 +0000
committerJason Rumney2006-03-11 23:46:27 +0000
commitf0c947b5a090d8a6af3077a91a26a3a98787925d (patch)
tree8ec6385c620048664b341609c2eea5ee56d44acd /src
parentb452fd7aaac9dde74f095c907d5073f702e2cdb4 (diff)
downloademacs-f0c947b5a090d8a6af3077a91a26a3a98787925d.tar.gz
emacs-f0c947b5a090d8a6af3077a91a26a3a98787925d.zip
(signal_user_input): New function.
(post_character_message): Use it for keyboard input. (w32_msg_pump): Use it for mouse input.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index c116c51603b..c665bbad7f2 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2695,6 +2695,24 @@ w32_msg_worker (dw)
2695} 2695}
2696 2696
2697static void 2697static void
2698signal_user_input ()
2699{
2700 /* Interrupt any lisp that wants to be interrupted by input. */
2701 if (!NILP (Vthrow_on_input))
2702 {
2703 Vquit_flag = Vthrow_on_input;
2704 /* If we're inside a function that wants immediate quits,
2705 do it now. */
2706 if (immediate_quit && NILP (Vinhibit_quit))
2707 {
2708 immediate_quit = 0;
2709 QUIT;
2710 }
2711 }
2712}
2713
2714
2715static void
2698post_character_message (hwnd, msg, wParam, lParam, modifiers) 2716post_character_message (hwnd, msg, wParam, lParam, modifiers)
2699 HWND hwnd; 2717 HWND hwnd;
2700 UINT msg; 2718 UINT msg;
@@ -2751,6 +2769,8 @@ post_character_message (hwnd, msg, wParam, lParam, modifiers)
2751 to receive C-g to interrupt the lisp thread. */ 2769 to receive C-g to interrupt the lisp thread. */
2752 cancel_all_deferred_msgs (); 2770 cancel_all_deferred_msgs ();
2753 } 2771 }
2772 else
2773 signal_user_input ();
2754 } 2774 }
2755 2775
2756 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 2776 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
@@ -3270,6 +3290,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3270 3290
3271 wmsg.dwModifiers = w32_get_modifiers (); 3291 wmsg.dwModifiers = w32_get_modifiers ();
3272 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3292 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3293 signal_user_input ();
3273 3294
3274 /* Need to return true for XBUTTON messages, false for others, 3295 /* Need to return true for XBUTTON messages, false for others,
3275 to indicate that we processed the message. */ 3296 to indicate that we processed the message. */
@@ -3324,11 +3345,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3324 case WM_MOUSEWHEEL: 3345 case WM_MOUSEWHEEL:
3325 wmsg.dwModifiers = w32_get_modifiers (); 3346 wmsg.dwModifiers = w32_get_modifiers ();
3326 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3347 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3348 signal_user_input ();
3327 return 0; 3349 return 0;
3328 3350
3329 case WM_DROPFILES: 3351 case WM_DROPFILES:
3330 wmsg.dwModifiers = w32_get_modifiers (); 3352 wmsg.dwModifiers = w32_get_modifiers ();
3331 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3353 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3354 signal_user_input ();
3332 return 0; 3355 return 0;
3333 3356
3334 case WM_TIMER: 3357 case WM_TIMER:
@@ -3338,6 +3361,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3338 if (saved_mouse_button_msg.msg.hwnd) 3361 if (saved_mouse_button_msg.msg.hwnd)
3339 { 3362 {
3340 post_msg (&saved_mouse_button_msg); 3363 post_msg (&saved_mouse_button_msg);
3364 signal_user_input ();
3341 saved_mouse_button_msg.msg.hwnd = 0; 3365 saved_mouse_button_msg.msg.hwnd = 0;
3342 } 3366 }
3343 KillTimer (hwnd, mouse_button_timer); 3367 KillTimer (hwnd, mouse_button_timer);
@@ -3840,6 +3864,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3840 { 3864 {
3841 wmsg.dwModifiers = w32_get_modifiers (); 3865 wmsg.dwModifiers = w32_get_modifiers ();
3842 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3866 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3867 signal_user_input ();
3843 return 0; 3868 return 0;
3844 } 3869 }
3845 3870