emacs-diffs
[Top][All Lists]
Advanced

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

master 14c80c9db8 1/2: Work around some problems with Motif and the inpu


From: Po Lu
Subject: master 14c80c9db8 1/2: Work around some problems with Motif and the input extension
Date: Sun, 27 Feb 2022 01:56:57 -0500 (EST)

branch: master
commit 14c80c9db8dd4abf547bfe3e15020fc977e4bdba
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Work around some problems with Motif and the input extension
    
    * src/xmenu.c (create_and_show_popup_menu): Restore input focus
    to the frame's outer window if there was an input extension
    grab.
---
 src/xmenu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/xmenu.c b/src/xmenu.c
index 2bc9f5a93a..93bc90514c 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1687,6 +1687,14 @@ create_and_show_popup_menu (struct frame *f, 
widget_value *first_wv,
 
     unbind_to (specpdl_count, Qnil);
   }
+
+#if defined HAVE_XINPUT2 && defined USE_MOTIF
+  /* For some reason input focus isn't always restored to the outer
+     window after the menu pops down.  */
+  if (any_xi_grab_p)
+    XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
+                   RevertToParent, CurrentTime);
+#endif
 }
 
 #endif /* not USE_GTK */



reply via email to

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