From 00983aba269065250fa386eba7f25b2472ffc1bc Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 24 May 1995 04:42:09 +0000 Subject: [PATCH] (x_window) [both versions]: Set menubar_height. [USE_X_TOOLKIT] (x_window): Don't call XMoveWindow or x_calc_absolute_position. Do use the border_width. --- src/xfns.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index 906ff3d664f..df82d9ab2f6 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2371,6 +2371,7 @@ x_window (f, window_prompting, minibuffer_only) XtSetArg (al[ac], XtNallowShellResize, 1); ac++; XtSetArg (al[ac], XtNinput, 1); ac++; XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++; + XtSetArg (al[ac], XtNborderWidth, f->display.x->border_width); ac++; shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS, topLevelShellWidgetClass, FRAME_X_DISPLAY (f), al, ac); @@ -2429,6 +2430,8 @@ x_window (f, window_prompting, minibuffer_only) menubar_size += ibw; } + f->display.x->menubar_height = menubar_size; + /* Convert our geometry parameters into a geometry string and specify it. Note that we do not specify here whether the position @@ -2461,8 +2464,6 @@ x_window (f, window_prompting, minibuffer_only) XtSetValues (shell_widget, al, ac); } - x_calc_absolute_position (f); - XtManageChild (pane_widget); XtRealizeWidget (shell_widget); @@ -2518,12 +2519,6 @@ x_window (f, window_prompting, minibuffer_only) XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), f->display.x->text_cursor); - /* If we have a program-specified position, communicate it to - the window manager thus. */ - if (FRAME_X_WINDOW (f)) - XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget), - f->display.x->left_pos, f->display.x->top_pos); - UNBLOCK_INPUT; if (FRAME_X_WINDOW (f) == 0) @@ -2572,6 +2567,10 @@ x_window (f) class_hints.res_class = EMACS_CLASS; XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints); + /* The menubar is part of the ordinary display; + it does not count in addition to the height of the window. */ + f->display.x->menubar_height = 0; + /* This indicates that we use the "Passive Input" input model. Unless we do this, we don't get the Focus{In,Out} events that we need to draw the cursor correctly. Accursed bureaucrats. -- 2.39.2