diff options
| author | Po Lu <luangruo@yahoo.com> | 2022-03-02 11:10:00 +0000 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2022-03-02 11:10:00 +0000 |
| commit | 596d36f8cfd2c24df33668349cafbbf8a5ba1396 (patch) | |
| tree | 01e9ac0a4a4ffbc2cbfac7fb5f975f05c208a2ba /src | |
| parent | 68e293c81d8ef687500969461067dc774353968f (diff) | |
Fix menu bar position reporting on Haiku as well
* src/haikuterm.c (haiku_toolkit_position): New function.
(haiku_create_terminal): Register new hook.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuterm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/haikuterm.c b/src/haikuterm.c index a765eb715df..bdba6403aca 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -101,6 +101,15 @@ haiku_coords_from_parent (struct frame *f, int *x, int *y) } static void +haiku_toolkit_position (struct frame *f, int x, int y, + bool *menu_bar_p, bool *tool_bar_p) +{ + if (FRAME_OUTPUT_DATA (f)->menubar) + *menu_bar_p = (x >= 0 && x < FRAME_PIXEL_WIDTH (f) + && y >= 0 && y < FRAME_MENU_BAR_HEIGHT (f)); +} + +static void haiku_delete_terminal (struct terminal *terminal) { emacs_abort (); @@ -3728,6 +3737,7 @@ haiku_create_terminal (struct haiku_display_info *dpyinfo) terminal->menu_show_hook = haiku_menu_show; terminal->toggle_invisible_pointer_hook = haiku_toggle_invisible_pointer; terminal->fullscreen_hook = haiku_fullscreen; + terminal->toolkit_position_hook = haiku_toolkit_position; return terminal; } |
