From 723f5a070c9ef28ba93b406aa95122dfe8872fb6 Mon Sep 17 00:00:00 2001 From: Jan D Date: Fri, 9 Jul 2010 18:39:51 +0200 Subject: [PATCH] Fix frame sizing for Lucid/Motif/Lesstif. * xfns.c (x_window): Set borderWidth to 0 for pane and EmacsFrame. Frame size calculation is wrong otherwise. * xmenu.c (set_frame_menubar): Must realize menubar_widget to get the correct size for Motif. (free_frame_menubar): Call x_set_window_size to update frame size. --- src/ChangeLog | 9 +++++++++ src/xfns.c | 2 ++ src/xmenu.c | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ea1f1054c9d..fb0689a0e93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-07-09 Jan Djärv + + * xmenu.c (set_frame_menubar): Must realize menubar_widget to get the + correct size for Motif. + (free_frame_menubar): Call x_set_window_size to update frame size. + + * xfns.c (x_window): Set borderWidth to 0 for pane and + EmacsFrame. Frame size calculation is wrong otherwise. + 2010-07-09 Michael Albinus * dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, which diff --git a/src/xfns.c b/src/xfns.c index 3f4f32bbb2c..1dfaa381b3e 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2450,6 +2450,7 @@ x_window (f, window_prompting, minibuffer_only) XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; + XtSetArg (al[ac], XtNborderWidth, 0); ac++; XtSetValues (pane_widget, al, ac); f->output_data.x->column_widget = pane_widget; @@ -2465,6 +2466,7 @@ x_window (f, window_prompting, minibuffer_only) XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; + XtSetArg (al[ac], XtNborderWidth, 0); ac++; frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget, al, ac); diff --git a/src/xmenu.c b/src/xmenu.c index 431ef58e0b1..8d79aed3744 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1285,6 +1285,9 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) } { + if (f->output_data.x->menubar_widget) + XtRealizeWidget (f->output_data.x->menubar_widget); + int menubar_size = (f->output_data.x->menubar_widget ? (f->output_data.x->menubar_widget->core.height @@ -1385,7 +1388,7 @@ free_frame_menubar (f) XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); } #endif - + x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); UNBLOCK_INPUT; } } -- 2.39.2