# HG changeset patch # User Karl Heuer # Date 801290529 0 # Node ID cbd3724a969607e954eabe17e0fa29ea19b96d7a # Parent 507a45c7e91161cd453c453ae6a83a2fd527975f (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. diff -r 507a45c7e911 -r cbd3724a9696 src/xfns.c --- a/src/xfns.c Wed May 24 04:41:16 1995 +0000 +++ b/src/xfns.c Wed May 24 04:42:09 1995 +0000 @@ -2371,6 +2371,7 @@ 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 @@ 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 @@ XtSetValues (shell_widget, al, ac); } - x_calc_absolute_position (f); - XtManageChild (pane_widget); XtRealizeWidget (shell_widget); @@ -2518,12 +2519,6 @@ 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 @@ 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.