summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2018-06-11 14:58:09 -0700
committerDaniel Colascione <dancol@dancol.org>2018-06-11 16:10:34 -0700
commit2f6c682061a281dc3e397ff4727a164880e86e7b (patch)
treef5990303d483f7d80e1aa1e80a19dc64a6325b66 /src/w32term.c
parenta20fe5a7e3577f9b9ad5e88006962966240d9b0c (diff)
downloademacs-2f6c682061a281dc3e397ff4727a164880e86e7b.tar.gz
New focus management interface
focus-in-hook and focus-out-hook don't accurately reflect actual user-visible focus states. Add a new focus interface and mark the old one obsolete. * doc/lispref/frames.texi (Input Focus): Document new focus functions. Remove references to the now-obsolete focus hooks. * lisp/frame.el (frame-focus-state): New function. (after-focus-change-function): New variable. (focus-in-hook, focus-out-hook): Move to lisp from C; mark obsolete. * lisp/term/xterm.el (xterm-translate-focus-in) (xterm-translate-focus-out): Track tty focus in `tty-focus-state' terminal parameter; call `after-focus-change-function'. (xterm--suspend-tty-function): New function. * src/frame.c (Fhandle_switch_frame): Update docstring; don't call focus hooks. (focus-in-hook, focus-out-hook): Remove: moved to lisp. (syms_of_frame): Remove unread_switch_frame; add Vunread_switch_frame. * src/keyboard.c: (Finternal_handle_focus_in): New function. (make_lispy_event): Always report focus events to lisp; don't translate them to switch events sometimes. Lisp can take care of creating synthetic switch-frame events via `internal-handle-focus-in'. * src/w32term.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp. * src/xterm.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 24950dd25ec..ff0d2bf5ddb 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2886,20 +2886,6 @@ x_focus_changed (int type, int state, struct w32_display_info *dpyinfo,
{
x_new_focus_frame (dpyinfo, frame);
dpyinfo->w32_focus_event_frame = frame;
-
- /* Don't stop displaying the initial startup message
- for a switch-frame event we don't need. */
- if (NILP (Vterminal_frame)
- && CONSP (Vframe_list)
- && !NILP (XCDR (Vframe_list)))
- {
- bufp->arg = Qt;
- }
- else
- {
- bufp->arg = Qnil;
- }
-
bufp->kind = FOCUS_IN_EVENT;
XSETFRAME (bufp->frame_or_window, frame);
}