From 80eb0a994f6a81e408a1e8ebc8011bfb142580e5 Mon Sep 17 00:00:00 2001 From: Fred Pierresteguy Date: Thu, 31 Mar 1994 16:49:00 +0000 Subject: [PATCH] (x_window) [USE_X_TOOLKIT]: When doing geometry management, don't compute the size of the menubar if there is no menubar. --- src/xfns.c | 11 +++++++---- 1 file 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); -- 2.39.5