]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix MPX focus tracking upon frame deletion
authorPo Lu <luangruo@yahoo.com>
Sat, 17 Sep 2022 08:46:26 +0000 (16:46 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 17 Sep 2022 08:46:40 +0000 (16:46 +0800)
* src/xterm.c (x_free_frame_resources): Consider focus change
after.

src/xterm.c

index 8c41f14864a0cf954eff956e8867073b4d219d79..deceafbc817d3bc7a03daa0e57c01b8142c3f0ba 100644 (file)
@@ -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 ();
 }