Commit c81412a0 authored by Karl Heuer's avatar Karl Heuer

(x_calc_absolute_position): Use menubar_height field.

In toolkit case, use outermost Emacs widget and its parent.
[USE_X_TOOLKIT] (x_make_frame_visible): Do call x_set_offset.
parent 85e53327
......@@ -4740,6 +4740,13 @@ x_calc_absolute_position (f)
Window win, child;
int win_x = 0, win_y = 0;
int flags = f->display.x->size_hint_flags;
int this_window;
#ifdef USE_X_TOOLKIT
this_window = XtWindow (f->display.x->widget);
#else
this_window = FRAME_X_WINDOW (f);
#endif
/* Find the position of the outside upper-left corner of
the inner window, with respect to the outer window. */
......@@ -4749,7 +4756,7 @@ x_calc_absolute_position (f)
XTranslateCoordinates (FRAME_X_DISPLAY (f),
/* From-window, to-window. */
f->display.x->window_desc,
this_window,
f->display.x->parent_desc,
/* From-position, to-position. */
......@@ -4772,6 +4779,8 @@ x_calc_absolute_position (f)
f->display.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height
- 2 * f->display.x->border_width - win_y
- PIXEL_HEIGHT (f)
- (FRAME_EXTERNAL_MENU_BAR (f)
? f->display.x->menubar_height : 0)
+ f->display.x->top_pos);
/* The left_pos and top_pos
are now relative to the top and left screen edges,
......@@ -5026,10 +5035,8 @@ x_make_frame_visible (f)
if (! FRAME_VISIBLE_P (f))
{
#ifndef USE_X_TOOLKIT
if (! FRAME_ICONIFIED_P (f))
x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0);
#endif
if (! EQ (Vx_no_window_manager, Qt))
x_wm_set_window_state (f, NormalState);
......
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