]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix focus restoration upon x_mouse_leave again
authorPo Lu <luangruo@yahoo.com>
Mon, 12 Sep 2022 06:01:52 +0000 (14:01 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 12 Sep 2022 06:01:52 +0000 (14:01 +0800)
* src/xterm.c (x_mouse_leave): Call xi_handle_focus_change after
changing the implicit focus.

src/xterm.c

index 12234351a321e65d27a19dbe9cb0bd8c8c461b3e..48502f12d8de363394a3a1d0e8b9bf91b18f3a63 100644 (file)
@@ -13213,8 +13213,13 @@ x_mouse_leave (struct x_display_info *dpyinfo)
 
       device = xi_device_from_id (dpyinfo, dpyinfo->client_pointer_device);
 
-      if (device)
-       device->focus_implicit_frame = NULL;
+      if (device && device->focus_implicit_frame)
+       {
+         device->focus_implicit_frame = NULL;
+
+         /* The focus might have changed; compute the new focus.  */
+         xi_handle_focus_change (dpyinfo);
+       }
     }
 #endif
 }