Commit 00983aba authored by Karl Heuer's avatar Karl Heuer
Browse files

(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.
parent c81412a0
......@@ -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,
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)
/* If we have a program-specified position, communicate it to
the window manager thus. */
XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
f->display.x->left_pos, f->display.x->top_pos);
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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment