]> git.eshelyaron.com Git - emacs.git/commitdiff
Only focus frame implicitly if focus flag is set
authorPo Lu <luangruo@yahoo.com>
Sun, 26 Dec 2021 06:24:16 +0000 (14:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 26 Dec 2021 06:48:13 +0000 (14:48 +0800)
* src/xterm.c (x_detect_focus_change): Test for focus flag on
XI entry events.

src/xterm.c

index 12c14e5e4f1ac59b8c1fc949d2b122eb57bc0231..00cb04f005d9a2a4dad119ccbd246e472002ab2c 100644 (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),