diff options
| author | Po Lu <luangruo@yahoo.com> | 2022-05-01 09:15:52 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2022-05-01 09:15:52 +0800 |
| commit | 61d6d43fe59cb9e6cedb7973e2b6922bccdcd4e2 (patch) | |
| tree | c3c0a9b38b7cfb04415aa79845a5f6e28acbd49a /src | |
| parent | b2fdf78fd9ef46683775014716a2cbf98f11ad8c (diff) | |
Clean up X Windows tooltip code
* src/xfns.c (x_hide_tip): Remove "bloodcurdling hack".
* src/xterm.c (handle_one_xevent): Add a better version here
instead. The code is unlikely to be hit as well, since tooltip
frames are typically deleted, not just hidden.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 23 | ||||
| -rw-r--r-- | src/xterm.c | 28 |
2 files changed, 28 insertions, 23 deletions
diff --git a/src/xfns.c b/src/xfns.c index 06a0d4728cf..27bca5523cc 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -8243,29 +8243,6 @@ x_hide_tip (bool delete) else x_make_frame_invisible (XFRAME (tip_frame)); -#ifdef USE_LUCID - /* Bloodcurdling hack alert: The Lucid menu bar widget's - redisplay procedure is not called when a tip frame over - menu items is unmapped. Redisplay the menu manually... */ - { - Widget w; - struct frame *f = SELECTED_FRAME (); - - if (FRAME_X_P (f) && FRAME_LIVE_P (f)) - { - w = f->output_data.x->menubar_widget; - - if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) - && w != NULL) - { - block_input (); - xlwmenu_redisplay (w); - unblock_input (); - } - } - } -#endif /* USE_LUCID */ - was_open = Qt; } else diff --git a/src/xterm.c b/src/xterm.c index ea86b7f8033..4baaaf9ee8d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -14797,6 +14797,34 @@ handle_one_xevent (struct x_display_info *dpyinfo, { bool visible = FRAME_VISIBLE_P (f); +#ifdef USE_LUCID + /* Bloodcurdling hack alert: The Lucid menu bar widget's + redisplay procedure is not called when a tip frame over + menu items is unmapped. Redisplay the menu manually... */ + if (FRAME_TOOLTIP_P (f) && popup_activated ()) + { + Widget w; + Lisp_Object tail, frame; + struct frame *f1; + + FOR_EACH_FRAME (tail, frame) + { + if (!FRAME_X_P (XFRAME (frame))) + continue; + + f1 = XFRAME (frame); + + if (FRAME_LIVE_P (f1)) + { + w = FRAME_X_OUTPUT (f1)->menubar_widget; + + if (w && !DoesSaveUnders (FRAME_DISPLAY_INFO (f1)->screen)) + xlwmenu_redisplay (w); + } + } + } +#endif /* USE_LUCID */ + /* While a frame is unmapped, display generation is disabled; you don't want to spend time updating a display that won't ever be seen. */ |
