diff options
| author | Po Lu <luangruo@yahoo.com> | 2021-12-27 10:02:39 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2021-12-27 10:05:01 +0800 |
| commit | d9977018e045be002f2b48254215fda5f3a067fc (patch) | |
| tree | 4506aad3d6645682d7b1f5af1dc969bc866a6663 /src/xmenu.c | |
| parent | 2ccb1568876f6ac7d8b980d60d91a689e797ab36 (diff) | |
Fix menu window persistence and entry/leave events on Lucid on XI2
* src/xmenu.c (x_activate_menubar): Always clear the XI2 grab on
Xt.
* src/xterm.c (handle_one_xevent): On XI2, ignore LeaveNotify
events coming from the shell widget and use `x_window_to_frame'
to find the frame when handling XI_Leave events.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 9b0353f133f..f3b7c45ffff 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -448,11 +448,11 @@ x_activate_menubar (struct frame *f) XPutBackEvent (f->output_data.x->display_info->display, f->output_data.x->saved_menu_event); #else -#ifdef USE_MOTIF -#ifdef HAVE_XINPUT2 +#if defined USE_X_TOOLKIT && defined HAVE_XINPUT2 struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); - /* Clear the XI2 grab so Motif can set a core grab. Otherwise some - versions of Motif will emit a warning and hang. */ + /* Clear the XI2 grab so Motif or lwlib can set a core grab. + Otherwise some versions of Motif will emit a warning and hang, + and lwlib will fail to destroy the menu window. */ if (dpyinfo->num_devices) { @@ -461,7 +461,6 @@ x_activate_menubar (struct frame *f) CurrentTime); } #endif -#endif XtDispatchEvent (f->output_data.x->saved_menu_event); #endif unblock_input (); |
