[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 006a447455: Improve behavior of Motif popup menus on XI2
From: |
Po Lu |
Subject: |
master 006a447455: Improve behavior of Motif popup menus on XI2 |
Date: |
Tue, 1 Mar 2022 20:02:23 -0500 (EST) |
branch: master
commit 006a4474551ed43515c6249d2ed4cfcaefd9b7a5
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Improve behavior of Motif popup menus on XI2
* src/xmenu.c (create_and_show_popup_menu): Set input focus to
menu window.
---
src/xmenu.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/xmenu.c b/src/xmenu.c
index fb80221e15..e085fa1ace 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1728,6 +1728,15 @@ create_and_show_popup_menu (struct frame *f,
widget_value *first_wv,
/* Display the menu. */
lw_popup_menu (menu, &dummy);
+
+#if defined HAVE_XINPUT2 && defined USE_MOTIF
+ /* This is needed to prevent XI_Enter events that set an implicit
+ focus from being sent. */
+ if (dpyinfo->supports_xi2)
+ XSetInputFocus (XtDisplay (menu), XtWindow (menu),
+ RevertToParent, CurrentTime);
+#endif
+
popup_activated_flag = 1;
#if defined HAVE_XINPUT2 && !defined USE_MOTIF
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 006a447455: Improve behavior of Motif popup menus on XI2,
Po Lu <=