Only focus frame implicitly if focus flag is set

* src/xterm.c (x_detect_focus_change): Test for focus flag on
XI entry events.
This commit is contained in:
Po Lu 2021-12-26 14:24:16 +08:00
parent 6866cf9c37
commit 50484ad7d7

View file

@ -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),