1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-28 01:00:52 -07:00

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.
This commit is contained in:
Po Lu 2022-02-27 14:40:26 +08:00
parent 4c12a16aa7
commit 14c80c9db8

View file

@ -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 */