summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index f4d0921762c..a7d47188ef5 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -627,7 +627,7 @@ update_frame_menubar (struct frame *f)
xg_update_frame_menubar (f);
#else
struct x_output *x;
- int columns, rows;
+/** int columns, rows; **/
eassert (FRAME_X_P (f));
@@ -639,8 +639,8 @@ update_frame_menubar (struct frame *f)
block_input ();
/* Save the size of the frame because the pane widget doesn't accept
to resize itself. So force it. */
- columns = FRAME_COLS (f);
- rows = FRAME_LINES (f);
+/** columns = FRAME_COLS (f); **/
+/** rows = FRAME_LINES (f); **/
/* Do the voodoo which means "I'm changing lots of things, don't try
to refigure sizes until I'm done." */
@@ -662,7 +662,8 @@ update_frame_menubar (struct frame *f)
lw_refigure_widget (x->column_widget, True);
/* Force the pane widget to resize itself with the right values. */
- EmacsFrameSetCharSize (x->edit_widget, columns, rows);
+/** EmacsFrameSetCharSize (x->edit_widget, columns, rows); **/
+ adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 2, 0);
unblock_input ();
#endif
}
@@ -705,7 +706,7 @@ apply_systemfont_to_menu (struct frame *f, Widget w)
void
set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
{
- xt_or_gtk_widget menubar_widget;
+ xt_or_gtk_widget menubar_widget, old_widget;
#ifdef USE_X_TOOLKIT
LWLIB_ID id;
#endif
@@ -718,7 +719,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
eassert (FRAME_X_P (f));
- menubar_widget = f->output_data.x->menubar_widget;
+ menubar_widget = old_widget = f->output_data.x->menubar_widget;
XSETFRAME (Vmenu_updating_frame, f);
@@ -1099,7 +1100,15 @@ free_frame_menubar (struct frame *f)
if (x1 == 0 && y1 == 0)
XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
#endif
- x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
+ adjust_frame_size (f, FRAME_TEXT_WIDTH (f),
+ FRAME_TEXT_HEIGHT (f), 2, 0);
+ /*
+ if (frame_inhibit_resize (f, 0))
+ change_frame_size (f, 0, 0, 0, 0, 0, 1);
+ else
+ x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f),
+ FRAME_TEXT_HEIGHT (f), 1);
+ */
}
unblock_input ();
}