From: Po Lu Date: Sat, 17 Sep 2022 08:46:26 +0000 (+0800) Subject: Fix MPX focus tracking upon frame deletion X-Git-Tag: emacs-29.0.90~1856^2~426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7eec293a6e3b6a1c34fb2552d4439fee5d47e42;p=emacs.git Fix MPX focus tracking upon frame deletion * src/xterm.c (x_free_frame_resources): Consider focus change after. --- diff --git a/src/xterm.c b/src/xterm.c index 8c41f14864a..deceafbc817 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -27354,6 +27354,16 @@ x_free_frame_resources (struct frame *f) if (f == hlinfo->mouse_face_mouse_frame) reset_mouse_highlight (hlinfo); +#ifdef HAVE_XINPUT2 + /* Consider a frame being unfocused with no following FocusIn event + while an older focus from another seat exists. The client + pointer should then revert to the other seat, so handle potential + focus changes. */ + + if (dpyinfo->supports_xi2) + xi_handle_focus_change (dpyinfo); +#endif + unblock_input (); }