comparison src/xterm.c @ 11896:507a45c7e911

(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.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 May 1995 04:41:16 +0000
parents 73fb6570f718
children 8ecc60a02138
comparison
equal deleted inserted replaced
11895:81f2806578ed 11896:507a45c7e911
4738 struct frame *f; 4738 struct frame *f;
4739 { 4739 {
4740 Window win, child; 4740 Window win, child;
4741 int win_x = 0, win_y = 0; 4741 int win_x = 0, win_y = 0;
4742 int flags = f->display.x->size_hint_flags; 4742 int flags = f->display.x->size_hint_flags;
4743 int this_window;
4744
4745 #ifdef USE_X_TOOLKIT
4746 this_window = XtWindow (f->display.x->widget);
4747 #else
4748 this_window = FRAME_X_WINDOW (f);
4749 #endif
4743 4750
4744 /* Find the position of the outside upper-left corner of 4751 /* Find the position of the outside upper-left corner of
4745 the inner window, with respect to the outer window. */ 4752 the inner window, with respect to the outer window. */
4746 if (f->display.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) 4753 if (f->display.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
4747 { 4754 {
4748 BLOCK_INPUT; 4755 BLOCK_INPUT;
4749 XTranslateCoordinates (FRAME_X_DISPLAY (f), 4756 XTranslateCoordinates (FRAME_X_DISPLAY (f),
4750 4757
4751 /* From-window, to-window. */ 4758 /* From-window, to-window. */
4752 f->display.x->window_desc, 4759 this_window,
4753 f->display.x->parent_desc, 4760 f->display.x->parent_desc,
4754 4761
4755 /* From-position, to-position. */ 4762 /* From-position, to-position. */
4756 0, 0, &win_x, &win_y, 4763 0, 0, &win_x, &win_y,
4757 4764
4770 4777
4771 if (flags & YNegative) 4778 if (flags & YNegative)
4772 f->display.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height 4779 f->display.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height
4773 - 2 * f->display.x->border_width - win_y 4780 - 2 * f->display.x->border_width - win_y
4774 - PIXEL_HEIGHT (f) 4781 - PIXEL_HEIGHT (f)
4782 - (FRAME_EXTERNAL_MENU_BAR (f)
4783 ? f->display.x->menubar_height : 0)
4775 + f->display.x->top_pos); 4784 + f->display.x->top_pos);
4776 /* The left_pos and top_pos 4785 /* The left_pos and top_pos
4777 are now relative to the top and left screen edges, 4786 are now relative to the top and left screen edges,
4778 so the flags should correspond. */ 4787 so the flags should correspond. */
4779 f->display.x->size_hint_flags &= ~ (XNegative | YNegative); 4788 f->display.x->size_hint_flags &= ~ (XNegative | YNegative);
5024 if (!NILP (type)) 5033 if (!NILP (type))
5025 x_bitmap_icon (f, type); 5034 x_bitmap_icon (f, type);
5026 5035
5027 if (! FRAME_VISIBLE_P (f)) 5036 if (! FRAME_VISIBLE_P (f))
5028 { 5037 {
5029 #ifndef USE_X_TOOLKIT
5030 if (! FRAME_ICONIFIED_P (f)) 5038 if (! FRAME_ICONIFIED_P (f))
5031 x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0); 5039 x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0);
5032 #endif
5033 5040
5034 if (! EQ (Vx_no_window_manager, Qt)) 5041 if (! EQ (Vx_no_window_manager, Qt))
5035 x_wm_set_window_state (f, NormalState); 5042 x_wm_set_window_state (f, NormalState);
5036 #ifdef USE_X_TOOLKIT 5043 #ifdef USE_X_TOOLKIT
5037 /* This was XtPopup, but that did nothing for an iconified frame. */ 5044 /* This was XtPopup, but that did nothing for an iconified frame. */