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.
This commit is contained in:
Jan D 2010-07-09 18:39:51 +02:00
parent 2536a4b7d8
commit 723f5a070c
3 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2010-07-09 Jan Djärv <jan.h.d@swipnet.se>
* 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 <michael.albinus@gmx.de>
* dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, which

View file

@ -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);

View file

@ -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;
}
}