summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorFred Pierresteguy <F.Pierresteguy@frcl.bull.fr>1994-03-31 16:49:00 +0000
committerFred Pierresteguy <F.Pierresteguy@frcl.bull.fr>1994-03-31 16:49:00 +0000
commite126f8a33f530d306165b5dd0079a048f672016c (patch)
tree5fea990e44428eb2107a6d628f18883c4aee6ef4 /src/xfns.c
parentb8f059415ee1829fa7f7dba6abc202eb5488cf43 (diff)
downloademacs-e126f8a33f530d306165b5dd0079a048f672016c.tar.gz
(x_window) [USE_X_TOOLKIT]: When doing geometry management, don't compute the
size of the menubar if there is no menubar.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 5eaf11447cc..45dce7661e7 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1776,17 +1776,20 @@ x_window (f)
char *tem, shell_position[32];
Arg al[2];
int ac = 0;
+ int menubar_size =
+ (f->display.x->menubar_widget
+ ? (f->display.x->menubar_widget->core.height
+ + f->display.x->menubar_widget->core.border_width)
+ : 0);
if (window_prompting & USPosition)
sprintf (shell_position, "=%dx%d%c%d%c%d", PIXEL_WIDTH (f),
- PIXEL_HEIGHT (f) + f->display.x->menubar_widget->core.height
- + f->display.x->menubar_widget->core.border_width,
+ PIXEL_HEIGHT (f) + menubar_size,
'+', f->display.x->left_pos,
'+', f->display.x->top_pos);
else
sprintf (shell_position, "=%dx%d", PIXEL_WIDTH (f),
- PIXEL_HEIGHT (f) + f->display.x->menubar_widget->core.height
- + f->display.x->menubar_widget->core.border_width);
+ PIXEL_HEIGHT (f) + menubar_size);
len = strlen (shell_position) + 1;
tem = (char *) xmalloc (len);
strncpy (tem, shell_position, len);