diff options
| author | Gerd Moellmann | 2000-06-08 20:57:01 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-06-08 20:57:01 +0000 |
| commit | c51c7093e98ee5fd96f772dae2214c36122eace1 (patch) | |
| tree | 5fa0ef06cfe15d5fca7b10a275bb937b5e24f1cf /src | |
| parent | eb72635f8a6b56026a3baa4b915e39afe85a7b9f (diff) | |
| download | emacs-c51c7093e98ee5fd96f772dae2214c36122eace1.tar.gz emacs-c51c7093e98ee5fd96f772dae2214c36122eace1.zip | |
(kbd_buffer_get_event): Handle FOCUS_IN_EVENT by
generating a switch-frame event if necessary.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index a402b44f1c0..c5cc3e45a96 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3315,10 +3315,28 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3315 | obj = Fcons (Qhelp_echo, event->frame_or_window); | 3315 | obj = Fcons (Qhelp_echo, event->frame_or_window); |
| 3316 | kbd_fetch_ptr = event + 1; | 3316 | kbd_fetch_ptr = event + 1; |
| 3317 | } | 3317 | } |
| 3318 | /* If this event is on a different frame, return a switch-frame this | 3318 | else if (event->kind == FOCUS_IN_EVENT) |
| 3319 | time, and leave the event in the queue for next time. */ | 3319 | { |
| 3320 | /* Notification of a FocusIn event. The frame receiving the | ||
| 3321 | focus is in event->frame_or_window. Generate a | ||
| 3322 | switch-frame event if necessary. */ | ||
| 3323 | Lisp_Object frame, focus; | ||
| 3324 | |||
| 3325 | frame = event->frame_or_window; | ||
| 3326 | focus = FRAME_FOCUS_FRAME (XFRAME (frame)); | ||
| 3327 | if (FRAMEP (focus)) | ||
| 3328 | frame = focus; | ||
| 3329 | |||
| 3330 | if (!EQ (frame, internal_last_event_frame) | ||
| 3331 | && !EQ (frame, selected_frame)) | ||
| 3332 | obj = make_lispy_switch_frame (frame); | ||
| 3333 | internal_last_event_frame = frame; | ||
| 3334 | kbd_fetch_ptr = event + 1; | ||
| 3335 | } | ||
| 3320 | else | 3336 | else |
| 3321 | { | 3337 | { |
| 3338 | /* If this event is on a different frame, return a switch-frame this | ||
| 3339 | time, and leave the event in the queue for next time. */ | ||
| 3322 | Lisp_Object frame; | 3340 | Lisp_Object frame; |
| 3323 | Lisp_Object focus; | 3341 | Lisp_Object focus; |
| 3324 | 3342 | ||