aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 65938a5eb56..6d509dd42be 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3567,14 +3567,22 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event,
3567#endif /* subprocesses */ 3567#endif /* subprocesses */
3568 } 3568 }
3569 3569
3570 Lisp_Object ignore_event = Qnil;
3571
3572 switch (event->kind)
3573 {
3574 case FOCUS_IN_EVENT: ignore_event = Qfocus_in; break;
3575 case FOCUS_OUT_EVENT: ignore_event = Qfocus_out; break;
3576 case HELP_EVENT: ignore_event = Qhelp; break;
3577 case ICONIFY_EVENT: ignore_event = Qiconify; break;
3578 case DEICONIFY_EVENT: ignore_event = Qdeiconify; break;
3579 case SELECTION_REQUEST_EVENT: ignore_event = Qselection_request; break;
3580 }
3581
3570 /* If we're inside while-no-input, and this event qualifies 3582 /* If we're inside while-no-input, and this event qualifies
3571 as input, set quit-flag to cause an interrupt. */ 3583 as input, set quit-flag to cause an interrupt. */
3572 if (!NILP (Vthrow_on_input) 3584 if (!NILP (Vthrow_on_input)
3573 && event->kind != FOCUS_IN_EVENT 3585 && !NILP (Fmemq (ignore_event, Vwhile_no_input_ignore_events)))
3574 && event->kind != FOCUS_OUT_EVENT
3575 && event->kind != HELP_EVENT
3576 && event->kind != ICONIFY_EVENT
3577 && event->kind != DEICONIFY_EVENT)
3578 { 3586 {
3579 Vquit_flag = Vthrow_on_input; 3587 Vquit_flag = Vthrow_on_input;
3580 /* If we're inside a function that wants immediate quits, 3588 /* If we're inside a function that wants immediate quits,
@@ -11164,6 +11172,10 @@ syms_of_keyboard (void)
11164 DEFSYM (Qiconify_frame, "iconify-frame"); 11172 DEFSYM (Qiconify_frame, "iconify-frame");
11165 DEFSYM (Qmake_frame_visible, "make-frame-visible"); 11173 DEFSYM (Qmake_frame_visible, "make-frame-visible");
11166 DEFSYM (Qselect_window, "select-window"); 11174 DEFSYM (Qselect_window, "select-window");
11175 DEFSYM (Qhelp, "help");
11176 DEFSYM (Qiconify, "iconify");
11177 DEFSYM (Qdeiconify, "deiconify");
11178 DEFSYM (Qselection_request, "selection-request");
11167 { 11179 {
11168 int i; 11180 int i;
11169 11181
@@ -11822,6 +11834,11 @@ signals. */);
11822 11834
11823 /* Create the initial keyboard. Qt means 'unset'. */ 11835 /* Create the initial keyboard. Qt means 'unset'. */
11824 initial_kboard = allocate_kboard (Qt); 11836 initial_kboard = allocate_kboard (Qt);
11837
11838 DEFVAR_LISP ("while-no-input-ignore-events",
11839 Vwhile_no_input_ignore_events,
11840 doc: /* Ignored events from while-no-input. */);
11841 Vwhile_no_input_ignore_events = Qnil;
11825} 11842}
11826 11843
11827void 11844void