diff options
| author | Jan D | 2010-07-09 18:39:51 +0200 |
|---|---|---|
| committer | Jan D | 2010-07-09 18:39:51 +0200 |
| commit | 723f5a070c9ef28ba93b406aa95122dfe8872fb6 (patch) | |
| tree | 05fa9ee299fbe35850f820f4c8027dec4bb34a76 /src | |
| parent | 2536a4b7d8b7e662db3d54a9eb8fae63ceebfc14 (diff) | |
| download | emacs-723f5a070c9ef28ba93b406aa95122dfe8872fb6.tar.gz emacs-723f5a070c9ef28ba93b406aa95122dfe8872fb6.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xmenu.c | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ea1f1054c9d..fb0689a0e93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2010-07-09 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xmenu.c (set_frame_menubar): Must realize menubar_widget to get the | ||
| 4 | correct size for Motif. | ||
| 5 | (free_frame_menubar): Call x_set_window_size to update frame size. | ||
| 6 | |||
| 7 | * xfns.c (x_window): Set borderWidth to 0 for pane and | ||
| 8 | EmacsFrame. Frame size calculation is wrong otherwise. | ||
| 9 | |||
| 1 | 2010-07-09 Michael Albinus <michael.albinus@gmx.de> | 10 | 2010-07-09 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 11 | ||
| 3 | * dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, which | 12 | * 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) | |||
| 2450 | XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; | 2450 | XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; |
| 2451 | XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; | 2451 | XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; |
| 2452 | XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; | 2452 | XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; |
| 2453 | XtSetArg (al[ac], XtNborderWidth, 0); ac++; | ||
| 2453 | XtSetValues (pane_widget, al, ac); | 2454 | XtSetValues (pane_widget, al, ac); |
| 2454 | f->output_data.x->column_widget = pane_widget; | 2455 | f->output_data.x->column_widget = pane_widget; |
| 2455 | 2456 | ||
| @@ -2465,6 +2466,7 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2465 | XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; | 2466 | XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; |
| 2466 | XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; | 2467 | XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; |
| 2467 | XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; | 2468 | XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; |
| 2469 | XtSetArg (al[ac], XtNborderWidth, 0); ac++; | ||
| 2468 | frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget, | 2470 | frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget, |
| 2469 | al, ac); | 2471 | al, ac); |
| 2470 | 2472 | ||
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) | |||
| 1285 | } | 1285 | } |
| 1286 | 1286 | ||
| 1287 | { | 1287 | { |
| 1288 | if (f->output_data.x->menubar_widget) | ||
| 1289 | XtRealizeWidget (f->output_data.x->menubar_widget); | ||
| 1290 | |||
| 1288 | int menubar_size | 1291 | int menubar_size |
| 1289 | = (f->output_data.x->menubar_widget | 1292 | = (f->output_data.x->menubar_widget |
| 1290 | ? (f->output_data.x->menubar_widget->core.height | 1293 | ? (f->output_data.x->menubar_widget->core.height |
| @@ -1385,7 +1388,7 @@ free_frame_menubar (f) | |||
| 1385 | XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); | 1388 | XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); |
| 1386 | } | 1389 | } |
| 1387 | #endif | 1390 | #endif |
| 1388 | 1391 | x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); | |
| 1389 | UNBLOCK_INPUT; | 1392 | UNBLOCK_INPUT; |
| 1390 | } | 1393 | } |
| 1391 | } | 1394 | } |