diff options
| author | Gerd Moellmann | 2000-12-01 22:15:12 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-01 22:15:12 +0000 |
| commit | 7708ced012fc22dc9fed596d157f0f5f24b1bbcd (patch) | |
| tree | 54a344aaa0fdb295964674c0bb54db0bd1f3cf66 /src | |
| parent | 447e9da0fa09da826a033791d1151040d702064e (diff) | |
| download | emacs-7708ced012fc22dc9fed596d157f0f5f24b1bbcd.tar.gz emacs-7708ced012fc22dc9fed596d157f0f5f24b1bbcd.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 40 |
2 files changed, 29 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9c98f9d31f6..085d44f8ce7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2000-12-01 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-12-01 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xterm.c (x_calc_absolute_position): Don't subtract menubar's | ||
| 4 | height for YNegative. | ||
| 5 | (x_calc_absolute_position) [USE_MOTIF]: Use the column widget's | ||
| 6 | height; also see comment there. | ||
| 7 | |||
| 3 | * window.c (coordinates_in_window): Handle computations for | 8 | * window.c (coordinates_in_window): Handle computations for |
| 4 | positions on the vertical bar and fringes differently for | 9 | positions on the vertical bar and fringes differently for |
| 5 | window-system frames. Consider some pixels near the vertical bar | 10 | window-system frames. Consider some pixels near the vertical bar |
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. */ |