diff options
| author | Gerd Moellmann | 2000-06-08 20:56:24 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-06-08 20:56:24 +0000 |
| commit | eb72635f8a6b56026a3baa4b915e39afe85a7b9f (patch) | |
| tree | 9eb2147ceb831e8e77e5e926b5320aba10153855 /src | |
| parent | 767bf649a9182f7912dae51cddc55247a416e332 (diff) | |
| download | emacs-eb72635f8a6b56026a3baa4b915e39afe85a7b9f.tar.gz emacs-eb72635f8a6b56026a3baa4b915e39afe85a7b9f.zip | |
(XTread_socket) <FocusIn>: Queue a FOCUS_IN_EVENT which
will be translated to a switch-frame event in when reading the
event queue. This is necessary because Emacs otherwise won't
perform a switch-frame to a new frame until some other event, for
example a keystroke event, forces it to do so. This has various
effects, one visible being that the cursor of a frame created with
C-x 5 2 or switched to with a window manager key binding like
A-TAB stays hollow because selected_window isn't on the newly
focused frame until the switch-frame is performed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index 295ee422b1e..eea9b76d191 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9609,7 +9609,20 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 9609 | if (event.xfocus.detail != NotifyPointer) | 9609 | if (event.xfocus.detail != NotifyPointer) |
| 9610 | dpyinfo->x_focus_event_frame = f; | 9610 | dpyinfo->x_focus_event_frame = f; |
| 9611 | if (f) | 9611 | if (f) |
| 9612 | x_new_focus_frame (dpyinfo, f); | 9612 | { |
| 9613 | x_new_focus_frame (dpyinfo, f); | ||
| 9614 | |||
| 9615 | /* Don't stop displaying the initial startup message | ||
| 9616 | for a switch-frame event we don't need. */ | ||
| 9617 | if (GC_NILP (Vterminal_frame) | ||
| 9618 | && GC_CONSP (Vframe_list) | ||
| 9619 | && !GC_NILP (XCDR (Vframe_list))) | ||
| 9620 | { | ||
| 9621 | bufp->kind = FOCUS_IN_EVENT; | ||
| 9622 | XSETFRAME (bufp->frame_or_window, f); | ||
| 9623 | ++bufp, ++count, --numchars; | ||
| 9624 | } | ||
| 9625 | } | ||
| 9613 | 9626 | ||
| 9614 | #ifdef HAVE_X_I18N | 9627 | #ifdef HAVE_X_I18N |
| 9615 | if (f && FRAME_XIC (f)) | 9628 | if (f && FRAME_XIC (f)) |