diff options
| author | Po Lu | 2022-03-02 09:01:48 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-02 09:01:48 +0800 |
| commit | 006a4474551ed43515c6249d2ed4cfcaefd9b7a5 (patch) | |
| tree | 006b587d94f14073be39b42adff9727efb46cdeb | |
| parent | caae254bb478ad83ba9caec6ec94b54e9abfb4c9 (diff) | |
| download | emacs-006a4474551ed43515c6249d2ed4cfcaefd9b7a5.tar.gz emacs-006a4474551ed43515c6249d2ed4cfcaefd9b7a5.zip | |
Improve behavior of Motif popup menus on XI2
* src/xmenu.c (create_and_show_popup_menu): Set input focus to
menu window.
| -rw-r--r-- | src/xmenu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index fb80221e15b..e085fa1ace5 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, | |||
| 1728 | 1728 | ||
| 1729 | /* Display the menu. */ | 1729 | /* Display the menu. */ |
| 1730 | lw_popup_menu (menu, &dummy); | 1730 | lw_popup_menu (menu, &dummy); |
| 1731 | |||
| 1732 | #if defined HAVE_XINPUT2 && defined USE_MOTIF | ||
| 1733 | /* This is needed to prevent XI_Enter events that set an implicit | ||
| 1734 | focus from being sent. */ | ||
| 1735 | if (dpyinfo->supports_xi2) | ||
| 1736 | XSetInputFocus (XtDisplay (menu), XtWindow (menu), | ||
| 1737 | RevertToParent, CurrentTime); | ||
| 1738 | #endif | ||
| 1739 | |||
| 1731 | popup_activated_flag = 1; | 1740 | popup_activated_flag = 1; |
| 1732 | 1741 | ||
| 1733 | #if defined HAVE_XINPUT2 && !defined USE_MOTIF | 1742 | #if defined HAVE_XINPUT2 && !defined USE_MOTIF |