* src/xmenu.c (create_and_show_popup_menu): Restore input focus
to the frame's outer window if there was an input extension
grab.
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 */