diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/xterm.c b/src/xterm.c index 0caf901a8b1..603a6f6e575 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11761,25 +11761,33 @@ x_calc_absolute_position (f) | |||
| 11761 | - PIXEL_WIDTH (f) | 11761 | - PIXEL_WIDTH (f) |
| 11762 | + f->output_data.x->left_pos); | 11762 | + f->output_data.x->left_pos); |
| 11763 | 11763 | ||
| 11764 | if (flags & YNegative) | 11764 | { |
| 11765 | { | 11765 | int height = PIXEL_HEIGHT (f); |
| 11766 | int menubar_height = 0; | ||
| 11767 | 11766 | ||
| 11768 | #ifdef USE_X_TOOLKIT | 11767 | #if defined USE_X_TOOLKIT && defined USE_MOTIF |
| 11769 | if (f->output_data.x->menubar_widget) | 11768 | /* Something is fishy here. When using Motif, starting Emacs with |
| 11770 | menubar_height | 11769 | `-g -0-0', the frame appears too low by a few pixels. |
| 11771 | = (f->output_data.x->menubar_widget->core.height | 11770 | |
| 11772 | + f->output_data.x->menubar_widget->core.border_width); | 11771 | This seems to be so because initially, while Emacs is starting, |
| 11772 | the column widget's height and the frame's pixel height are | ||
| 11773 | different. The column widget's height is the right one. In | ||
| 11774 | later invocations, when Emacs is up, the frame's pixel height | ||
| 11775 | is right, though. | ||
| 11776 | |||
| 11777 | It's not obvious where the initial small difference comes from. | ||
| 11778 | 2000-12-01, gerd. */ | ||
| 11779 | |||
| 11780 | XtVaGetValues (f->output_data.x->column_widget, XtNheight, &height, NULL); | ||
| 11773 | #endif | 11781 | #endif |
| 11774 | |||
| 11775 | f->output_data.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height | ||
| 11776 | - 2 * f->output_data.x->border_width | ||
| 11777 | - win_y | ||
| 11778 | - PIXEL_HEIGHT (f) | ||
| 11779 | - menubar_height | ||
| 11780 | + f->output_data.x->top_pos); | ||
| 11781 | } | ||
| 11782 | 11782 | ||
| 11783 | if (flags & YNegative) | ||
| 11784 | f->output_data.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height | ||
| 11785 | - 2 * f->output_data.x->border_width | ||
| 11786 | - win_y | ||
| 11787 | - height | ||
| 11788 | + f->output_data.x->top_pos); | ||
| 11789 | } | ||
| 11790 | |||
| 11783 | /* The left_pos and top_pos | 11791 | /* The left_pos and top_pos |
| 11784 | are now relative to the top and left screen edges, | 11792 | are now relative to the top and left screen edges, |
| 11785 | so the flags should correspond. */ | 11793 | so the flags should correspond. */ |