diff options
| author | Po Lu | 2022-01-18 02:41:29 +0000 |
|---|---|---|
| committer | Po Lu | 2022-01-18 02:41:29 +0000 |
| commit | 0a010902d7f5decde48e2a7069ae04eb65712ee9 (patch) | |
| tree | 1392f7ade6f990a7e6718e7ac731b5b59ed353a1 /src | |
| parent | 0c0b77b3ccecc7ca508254f66b4212ea7106b4df (diff) | |
| download | emacs-0a010902d7f5decde48e2a7069ae04eb65712ee9.tar.gz emacs-0a010902d7f5decde48e2a7069ae04eb65712ee9.zip | |
Fix system tooltips above menus
* src/haikufns.c (Fx_show_tip): Disable frame reuse inside a
menu.
(syms_of_haikufns): New symbol `tooltip-reuse-hidden-frame'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikufns.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/haikufns.c b/src/haikufns.c index 4ab7fa83b57..bf220177081 100644 --- a/src/haikufns.c +++ b/src/haikufns.c | |||
| @@ -1756,6 +1756,10 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 1756 | AUTO_STRING (tip, " *tip*"); | 1756 | AUTO_STRING (tip, " *tip*"); |
| 1757 | 1757 | ||
| 1758 | specbind (Qinhibit_redisplay, Qt); | 1758 | specbind (Qinhibit_redisplay, Qt); |
| 1759 | /* FIXME: Why don't re-used tooltip frames update correctly when a | ||
| 1760 | menu is active? */ | ||
| 1761 | if (popup_activated_p) | ||
| 1762 | specbind (Qtooltip_reuse_hidden_frame, Qnil); | ||
| 1759 | 1763 | ||
| 1760 | CHECK_STRING (string); | 1764 | CHECK_STRING (string); |
| 1761 | 1765 | ||
| @@ -2000,7 +2004,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 2000 | root_x, root_y); | 2004 | root_x, root_y); |
| 2001 | BWindow_resize (FRAME_HAIKU_WINDOW (tip_f), width, height); | 2005 | BWindow_resize (FRAME_HAIKU_WINDOW (tip_f), width, height); |
| 2002 | BView_resize_to (FRAME_HAIKU_VIEW (tip_f), width, height); | 2006 | BView_resize_to (FRAME_HAIKU_VIEW (tip_f), width, height); |
| 2003 | change_frame_size (tip_f, width, height, false, true, false); | 2007 | tip_f->pixel_width = width; |
| 2008 | tip_f->pixel_height = height; | ||
| 2004 | BWindow_set_tooltip_decoration (FRAME_HAIKU_WINDOW (tip_f)); | 2009 | BWindow_set_tooltip_decoration (FRAME_HAIKU_WINDOW (tip_f)); |
| 2005 | BWindow_set_visible (FRAME_HAIKU_WINDOW (tip_f), 1); | 2010 | BWindow_set_visible (FRAME_HAIKU_WINDOW (tip_f), 1); |
| 2006 | BWindow_sync (FRAME_HAIKU_WINDOW (tip_f)); | 2011 | BWindow_sync (FRAME_HAIKU_WINDOW (tip_f)); |
| @@ -2009,6 +2014,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 2009 | 2014 | ||
| 2010 | w->must_be_updated_p = true; | 2015 | w->must_be_updated_p = true; |
| 2011 | update_single_window (w); | 2016 | update_single_window (w); |
| 2017 | haiku_clear_under_internal_border (tip_f); | ||
| 2012 | 2018 | ||
| 2013 | set_buffer_internal_1 (old_buffer); | 2019 | set_buffer_internal_1 (old_buffer); |
| 2014 | unbind_to (count_1, Qnil); | 2020 | unbind_to (count_1, Qnil); |
| @@ -2459,6 +2465,7 @@ syms_of_haikufns (void) | |||
| 2459 | DEFSYM (Qalways, "always"); | 2465 | DEFSYM (Qalways, "always"); |
| 2460 | DEFSYM (Qnot_useful, "not-useful"); | 2466 | DEFSYM (Qnot_useful, "not-useful"); |
| 2461 | DEFSYM (Qwhen_mapped, "when-mapped"); | 2467 | DEFSYM (Qwhen_mapped, "when-mapped"); |
| 2468 | DEFSYM (Qtooltip_reuse_hidden_frame, "tooltip-reuse-hidden-frame"); | ||
| 2462 | 2469 | ||
| 2463 | defsubr (&Sx_hide_tip); | 2470 | defsubr (&Sx_hide_tip); |
| 2464 | defsubr (&Sxw_display_color_p); | 2471 | defsubr (&Sxw_display_color_p); |