mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Obey decorator-specified width and height of tooltip frames on Haiku
* 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.
This commit is contained in:
parent
8969953328
commit
1e1d2f18c6
@ -2080,6 +2080,16 @@ BWindow_set_offset (void *window, int x, int y)
|
||||
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)
|
||||
|
@ -939,6 +939,9 @@ extern "C"
|
||||
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);
|
||||
|
@ -2201,6 +2201,9 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
|
||||
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);
|
||||
|
@ -140,6 +140,9 @@ haiku_update_size_hints (struct frame *f)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user