diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-07-22 14:34:05 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-07-22 14:34:05 +0400 |
commit | 1d3710228bb29e020ab4f179b0b14362bb5691b4 (patch) | |
tree | 0e4a2e3a3b06a60f7a1a8a5b691edbb49c9a3b51 /src/xterm.h | |
parent | c448c6241fd6cef424447dbfeaee18240aece27a (diff) | |
download | emacs-1d3710228bb29e020ab4f179b0b14362bb5691b4.tar.gz |
* xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
menubar_height as such. Tweak comment.
(FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
* xterm.c (handle_one_xevent):
* gtkutil.c (xg_event_is_for_menubar):
* xfns.c (x_window) [USE_X_TOOLKIT]:
* xmenu.c (set_frame_menubar, free_frame_menubar): Prefer
to use FRAME_MENUBAR_HEIGHT.
Diffstat (limited to 'src/xterm.h')
-rw-r--r-- | src/xterm.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/xterm.h b/src/xterm.h index 0de9c99ab8f..398d70fc8fc 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -428,11 +428,11 @@ extern void select_visual (struct x_display_info *); struct x_output { - /* Height of menu bar widget, in pixels. - Zero if not using the X toolkit. - When using the toolkit, this value is not meaningful - if the menubar is turned off. */ +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) + /* Height of menu bar widget, in pixels. This value + is not meaningful if the menubar is turned off. */ int menubar_height; +#endif /* Height of tool bar widget, in pixels. top_height is used if tool bar at top, bottom_height if tool bar is at the bottom. @@ -714,10 +714,14 @@ enum #endif /* !USE_GTK */ #endif +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) +#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) +#else +#define FRAME_MENUBAR_HEIGHT(f) ((void) f, 0) +#endif /* USE_X_TOOLKIT || USE_GTK */ #define FRAME_FONT(f) ((f)->output_data.x->font) #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) -#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) #define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height) #define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \ ((f)->output_data.x->toolbar_bottom_height) |