Mercurial > emacs
comparison src/xterm.c @ 34099:06ab9f74a16b
(x_calc_absolute_position): Don't subtract menubar's
height for YNegative.
(x_calc_absolute_position) [USE_MOTIF]: Use the column widget's
height; also see comment there.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 01 Dec 2000 22:14:42 +0000 |
parents | 2482c17f546e |
children | a734985ec0bc |
comparison
equal
deleted
inserted
replaced
34098:deffe18d562d | 34099:06ab9f74a16b |
---|---|
11759 f->output_data.x->left_pos = (FRAME_X_DISPLAY_INFO (f)->width | 11759 f->output_data.x->left_pos = (FRAME_X_DISPLAY_INFO (f)->width |
11760 - 2 * f->output_data.x->border_width - win_x | 11760 - 2 * f->output_data.x->border_width - win_x |
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 { | |
11765 int height = PIXEL_HEIGHT (f); | |
11766 | |
11767 #if defined USE_X_TOOLKIT && defined USE_MOTIF | |
11768 /* Something is fishy here. When using Motif, starting Emacs with | |
11769 `-g -0-0', the frame appears too low by a few pixels. | |
11770 | |
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); | |
11781 #endif | |
11782 | |
11764 if (flags & YNegative) | 11783 if (flags & YNegative) |
11765 { | 11784 f->output_data.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height |
11766 int menubar_height = 0; | 11785 - 2 * f->output_data.x->border_width |
11767 | 11786 - win_y |
11768 #ifdef USE_X_TOOLKIT | 11787 - height |
11769 if (f->output_data.x->menubar_widget) | 11788 + f->output_data.x->top_pos); |
11770 menubar_height | 11789 } |
11771 = (f->output_data.x->menubar_widget->core.height | 11790 |
11772 + f->output_data.x->menubar_widget->core.border_width); | |
11773 #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 | |
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. */ |
11786 f->output_data.x->size_hint_flags &= ~ (XNegative | YNegative); | 11794 f->output_data.x->size_hint_flags &= ~ (XNegative | YNegative); |
11787 } | 11795 } |