* src/haiku_support.cc (BWindow_dimensions): New functions.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fx_show_tip): Use actual dimensions, because
the decorator might specify a minimum width and height for the
tooltip frame.
* src/haikuterm.c (haiku_update_size_hints): Ignore tooltip
frames.
wn->MoveTo (x, y);
}
+void
+BWindow_dimensions (void *window, int *width, int *height)
+{
+ BWindow *w = (BWindow *) window;
+ BRect frame = w->Frame ();
+
+ *width = BE_RECT_WIDTH (frame);
+ *height = BE_RECT_HEIGHT (frame);
+}
+
/* Iconify WINDOW. */
void
BWindow_iconify (void *window)
extern haiku_font_family_or_style *
be_list_font_families (size_t *length);
+ extern void
+ BWindow_dimensions (void *window, int *width, int *height);
+
#ifdef __cplusplus
extern void *
find_appropriate_view_for_draw (void *vw);
block_input ();
void *wnd = FRAME_HAIKU_WINDOW (tip_f);
BWindow_resize (wnd, width, height);
+ /* The window decorator might cause the actual width and height to
+ be larger than WIDTH and HEIGHT, so use the actual sizes. */
+ BWindow_dimensions (wnd, &width, &height);
BView_resize_to (FRAME_HAIKU_VIEW (tip_f), width, height);
BView_set_view_cursor (FRAME_HAIKU_VIEW (tip_f),
FRAME_OUTPUT_DATA (f)->current_cursor);
int base_width, base_height;
eassert (FRAME_HAIKU_P (f) && FRAME_HAIKU_WINDOW (f));
+ if (f->tooltip)
+ return;
+
base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);