emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 239bad7921: Fix focus restoration upon x_mouse_leave again


From: Po Lu
Subject: master 239bad7921: Fix focus restoration upon x_mouse_leave again
Date: Mon, 12 Sep 2022 02:02:16 -0400 (EDT)

branch: master
commit 239bad7921fc38891dc4ee09b57c96d32100f19f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix focus restoration upon x_mouse_leave again
    
    * src/xterm.c (x_mouse_leave): Call xi_handle_focus_change after
    changing the implicit focus.
---
 src/xterm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 12234351a3..48502f12d8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]