features, customize the variable @code{haiku-use-system-tooltips} to
the nil value, and Emacs will use its own implementation of tooltips.
- Both system tooltips and Emacs's own tooltips cannot display above
-the menu bar, so help text in the menu bar will display in the echo
-area instead.
+ System tooltips cannot display above the menu bar, so help text
+in the menu bar will display in the echo area instead when they are
+enabled.
@cindex X resources on Haiku
Unlike the X window system, Haiku does not have a system-wide
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
(if (and (display-graphic-p)
- (or (not (eq window-system 'haiku)) ;; On Haiku, there isn't a reliable way to show tooltips
- ;; above menus.
+ ;; On Haiku, system tooltips can't be displayed above
+ ;; menus.
+ (or (not (and haiku-use-system-tooltips
+ (eq window-system 'haiku)))
(not (menu-or-popup-active-p))))
(let ((previous-help tooltip-help-message))
(setq tooltip-help-message msg)
tip_last_string = string;
tip_last_parms = parms;
- /* Block input until the tip has been fully drawn, to avoid crashes
- when drawing tips in menus. */
- block_input ();
-
if (NILP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
{
/* Add default values to frame parameters. */
height = XFIXNUM (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
/* Calculate position of tooltip frame. */
compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y);
+
+ block_input ();
+ BWindow_set_offset (FRAME_HAIKU_WINDOW (tip_f),
+ root_x, root_y);
BWindow_resize (FRAME_HAIKU_WINDOW (tip_f), width, height);
- haiku_set_offset (tip_f, root_x, root_y, 1);
+ BView_resize_to (FRAME_HAIKU_VIEW (tip_f), width, height);
+ change_frame_size (tip_f, width, height, false, true, false);
BWindow_set_tooltip_decoration (FRAME_HAIKU_WINDOW (tip_f));
- BView_set_view_cursor (FRAME_HAIKU_VIEW (tip_f),
- FRAME_OUTPUT_DATA (XFRAME (frame))->current_cursor);
- SET_FRAME_VISIBLE (tip_f, 1);
BWindow_set_visible (FRAME_HAIKU_WINDOW (tip_f), 1);
BWindow_sync (FRAME_HAIKU_WINDOW (tip_f));
+ SET_FRAME_VISIBLE (tip_f, 1);
+ unblock_input ();
+
w->must_be_updated_p = true;
- flush_frame (tip_f);
update_single_window (w);
+
set_buffer_internal_1 (old_buffer);
unbind_to (count_1, Qnil);
- unblock_input ();
windows_or_buffers_changed = old_windows_or_buffers_changed;
start_timer: