diff options
| author | Po Lu | 2022-02-27 14:40:26 +0800 |
|---|---|---|
| committer | Po Lu | 2022-02-27 14:40:26 +0800 |
| commit | 14c80c9db8dd4abf547bfe3e15020fc977e4bdba (patch) | |
| tree | 375826dfdab5d98a1b55548b72a2967ed673e3dd /src | |
| parent | 4c12a16aa7593a3d11025bdf851a98a94c167df5 (diff) | |
| download | emacs-14c80c9db8dd4abf547bfe3e15020fc977e4bdba.tar.gz emacs-14c80c9db8dd4abf547bfe3e15020fc977e4bdba.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 2bc9f5a93a0..93bc90514c2 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, | |||
| 1687 | 1687 | ||
| 1688 | unbind_to (specpdl_count, Qnil); | 1688 | unbind_to (specpdl_count, Qnil); |
| 1689 | } | 1689 | } |
| 1690 | |||
| 1691 | #if defined HAVE_XINPUT2 && defined USE_MOTIF | ||
| 1692 | /* For some reason input focus isn't always restored to the outer | ||
| 1693 | window after the menu pops down. */ | ||
| 1694 | if (any_xi_grab_p) | ||
| 1695 | XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | ||
| 1696 | RevertToParent, CurrentTime); | ||
| 1697 | #endif | ||
| 1690 | } | 1698 | } |
| 1691 | 1699 | ||
| 1692 | #endif /* not USE_GTK */ | 1700 | #endif /* not USE_GTK */ |