diff options
| author | Karl Heuer | 1995-06-11 20:27:39 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-11 20:27:39 +0000 |
| commit | 5031cc1076ab730893e918c002cb60e71c8511f2 (patch) | |
| tree | 11fa256bef33735d9b70bf7be110aba897f74f2f /src | |
| parent | d067ea8b1adb530b42f2a9d99b1adf864ff6efba (diff) | |
| download | emacs-5031cc1076ab730893e918c002cb60e71c8511f2.tar.gz emacs-5031cc1076ab730893e918c002cb60e71c8511f2.zip | |
[USE_X_TOOLKIT] (x_window): If using Motif,
add some extra to sizes, for consistent behavior.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index f71c99460f4..93d6e78cf38 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2500,11 +2500,13 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2500 | char *tem, shell_position[32]; | 2500 | char *tem, shell_position[32]; |
| 2501 | Arg al[2]; | 2501 | Arg al[2]; |
| 2502 | int ac = 0; | 2502 | int ac = 0; |
| 2503 | int extra_borders = 0; | ||
| 2503 | int menubar_size | 2504 | int menubar_size |
| 2504 | = (f->display.x->menubar_widget | 2505 | = (f->display.x->menubar_widget |
| 2505 | ? (f->display.x->menubar_widget->core.height | 2506 | ? (f->display.x->menubar_widget->core.height |
| 2506 | + f->display.x->menubar_widget->core.border_width) | 2507 | + f->display.x->menubar_widget->core.border_width) |
| 2507 | : 0); | 2508 | : 0); |
| 2509 | extern char *lwlib_toolkit_type; | ||
| 2508 | 2510 | ||
| 2509 | if (FRAME_EXTERNAL_MENU_BAR (f)) | 2511 | if (FRAME_EXTERNAL_MENU_BAR (f)) |
| 2510 | { | 2512 | { |
| @@ -2515,6 +2517,13 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2515 | 2517 | ||
| 2516 | f->display.x->menubar_height = menubar_size; | 2518 | f->display.x->menubar_height = menubar_size; |
| 2517 | 2519 | ||
| 2520 | /* Motif seems to need this amount added to the sizes | ||
| 2521 | specified for the shell widget. The Athena/Lucid widgets don't. | ||
| 2522 | Both conclusions reached experimentally. -- rms. */ | ||
| 2523 | if (!strcmp (lwlib_toolkit_type, "motif")) | ||
| 2524 | XtVaGetValues (f->display.x->edit_widget, XtNinternalBorderWidth, | ||
| 2525 | &extra_borders, NULL); | ||
| 2526 | |||
| 2518 | /* Convert our geometry parameters into a geometry string | 2527 | /* Convert our geometry parameters into a geometry string |
| 2519 | and specify it. | 2528 | and specify it. |
| 2520 | Note that we do not specify here whether the position | 2529 | Note that we do not specify here whether the position |
| @@ -2531,13 +2540,15 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2531 | top = -top; | 2540 | top = -top; |
| 2532 | 2541 | ||
| 2533 | if (window_prompting & USPosition) | 2542 | if (window_prompting & USPosition) |
| 2534 | sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f), | 2543 | sprintf (shell_position, "=%dx%d%c%d%c%d", |
| 2535 | PIXEL_HEIGHT (f) + menubar_size, | 2544 | PIXEL_WIDTH (f) + extra_borders, |
| 2545 | PIXEL_HEIGHT (f) + menubar_size + extra_borders, | ||
| 2536 | (xneg ? '-' : '+'), left, | 2546 | (xneg ? '-' : '+'), left, |
| 2537 | (yneg ? '-' : '+'), top); | 2547 | (yneg ? '-' : '+'), top); |
| 2538 | else | 2548 | else |
| 2539 | sprintf (shell_position, "=%dx%d", PIXEL_WIDTH (f), | 2549 | sprintf (shell_position, "=%dx%d", |
| 2540 | PIXEL_HEIGHT (f) + menubar_size); | 2550 | PIXEL_WIDTH (f) + extra_borders, |
| 2551 | PIXEL_HEIGHT (f) + menubar_size + extra_borders); | ||
| 2541 | } | 2552 | } |
| 2542 | 2553 | ||
| 2543 | len = strlen (shell_position) + 1; | 2554 | len = strlen (shell_position) + 1; |