From: Po Lu Date: Sun, 26 Dec 2021 06:24:16 +0000 (+0800) Subject: Only focus frame implicitly if focus flag is set X-Git-Tag: emacs-29.0.90~3446 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50484ad7d78acb8358fb7da5b19cd17ef060d74e;p=emacs.git Only focus frame implicitly if focus flag is set * src/xterm.c (x_detect_focus_change): Test for focus flag on XI entry events. --- diff --git a/src/xterm.c b/src/xterm.c index 12c14e5e4f1..00cb04f005d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5246,6 +5246,7 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame, || xi_event->evtype == XI_Leave) && (((XIEnterEvent *) xi_event)->detail != XINotifyInferior) + && ((XIEnterEvent *) xi_event)->focus && !(focus_state & FOCUS_EXPLICIT)) x_focus_changed ((xi_event->evtype == XI_Enter ? FocusIn : FocusOut),