diff options
| author | Karl Heuer | 1995-05-24 04:41:16 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-05-24 04:41:16 +0000 |
| commit | c81412a05fecc1adc9994cb908dd3da1cea07e9b (patch) | |
| tree | 418f3764f24e8c96736df10e9ff608abe1319794 /src | |
| parent | 85e53327136aa5060b57de8190d79de199328069 (diff) | |
| download | emacs-c81412a05fecc1adc9994cb908dd3da1cea07e9b.tar.gz emacs-c81412a05fecc1adc9994cb908dd3da1cea07e9b.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index 7e2679b2f4e..1a00bd3c0cd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4740,6 +4740,13 @@ x_calc_absolute_position (f) | |||
| 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. */ |
| @@ -4749,7 +4756,7 @@ x_calc_absolute_position (f) | |||
| 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. */ |
| @@ -4772,6 +4779,8 @@ x_calc_absolute_position (f) | |||
| 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, |
| @@ -5026,10 +5035,8 @@ x_make_frame_visible (f) | |||
| 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); |