From 50484ad7d78acb8358fb7da5b19cd17ef060d74e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 26 Dec 2021 14:24:16 +0800 Subject: [PATCH] Only focus frame implicitly if focus flag is set * src/xterm.c (x_detect_focus_change): Test for focus flag on XI entry events. --- src/xterm.c | 1 + 1 file changed, 1 insertion(+) 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), -- 2.39.2