From 1d1c15673ed5eb6175210ba5f9ba33d8b1efb2c7 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 24 May 1995 04:42:52 +0000 Subject: [PATCH] (set_frame_menubar): Set menubar_height field. --- src/xmenu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/xmenu.c b/src/xmenu.c index aaa098d55ad..da760d4214b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -67,6 +67,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include +#include #include "../lwlib/lwlib.h" #else /* not USE_X_TOOLKIT */ #include "../oldXMenu/XMenu.h" @@ -1555,6 +1556,24 @@ set_frame_menubar (f, first_time) popup_deactivate_callback); f->display.x->menubar_widget = menubar_widget; } + + { + int menubar_size + = (f->display.x->menubar_widget + ? (f->display.x->menubar_widget->core.height + + f->display.x->menubar_widget->core.border_width) + : 0); + + if (FRAME_EXTERNAL_MENU_BAR (f)) + { + Dimension ibw = 0; + XtVaGetValues (f->display.x->column_widget, + XtNinternalBorderWidth, &ibw, NULL); + menubar_size += ibw; + } + + f->display.x->menubar_height = menubar_size; + } free_menubar_widget_value_tree (first_wv); -- 2.39.2