diff options
| author | Po Lu | 2022-02-21 14:29:58 +0800 |
|---|---|---|
| committer | Po Lu | 2022-02-21 14:29:58 +0800 |
| commit | e087c89b1e243bbd941a4a50b4bf99613e13d016 (patch) | |
| tree | 76e292eb90aeb4b5cce459604e595e82ff7c6c93 /src/gtkutil.h | |
| parent | 816cf19a3a4a2697392d58516c73374d7aaa1533 (diff) | |
| download | emacs-e087c89b1e243bbd941a4a50b4bf99613e13d016.tar.gz emacs-e087c89b1e243bbd941a4a50b4bf99613e13d016.zip | |
Prevent GTK from setting unreasonable size hints with large menu bars
* src/gtkutil.c (struct _EmacsMenuBar): New struct.
(emacs_menu_bar_init):
(emacs_menu_bar_class_init):
(emacs_menu_bar_get_preferred_width):
(emacs_menu_bar_new): New functions.
(xg_update_menu_item): Use our own menu bar class on GTK 3.
* src/gtkutil.h (EmacsMenuBar): New class.
Diffstat (limited to 'src/gtkutil.h')
| -rw-r--r-- | src/gtkutil.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtkutil.h b/src/gtkutil.h index b74244d84d0..f850ecc4219 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h | |||
| @@ -83,6 +83,10 @@ typedef struct xg_menu_item_cb_data_ | |||
| 83 | 83 | ||
| 84 | } xg_menu_item_cb_data; | 84 | } xg_menu_item_cb_data; |
| 85 | 85 | ||
| 86 | #ifdef HAVE_GTK3 | ||
| 87 | G_DECLARE_FINAL_TYPE (EmacsMenuBar, emacs_menu_bar, EMACS, MENU_BAR, GtkMenuBar) | ||
| 88 | #endif | ||
| 89 | |||
| 86 | extern bool xg_uses_old_file_dialog (void); | 90 | extern bool xg_uses_old_file_dialog (void); |
| 87 | 91 | ||
| 88 | extern char *xg_get_file_name (struct frame *f, | 92 | extern char *xg_get_file_name (struct frame *f, |