diff options
| author | Richard M. Stallman | 1994-05-01 23:29:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-01 23:29:27 +0000 |
| commit | 20f55f9a243edeb65197495d5b7f1a6cd92f804c (patch) | |
| tree | 9f2ba594fc910b39948cd7763efecf039155ff7a /src | |
| parent | f83f10ba999c98b1f714ad6a8f6735b863a473a8 (diff) | |
| download | emacs-20f55f9a243edeb65197495d5b7f1a6cd92f804c.tar.gz emacs-20f55f9a243edeb65197495d5b7f1a6cd92f804c.zip | |
(x_wm_set_size_hint): Don't try to handle negative positions.
(x_calc_absolute_position): New arg FLAGS. Use XNegative and YNegative.
(x_set_offset): Pass new arg.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/xterm.c b/src/xterm.c index ab040069763..7dc369dfc82 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5106,8 +5106,9 @@ x_new_font (f, newname) | |||
| 5106 | } | 5106 | } |
| 5107 | #endif /* ! defined (HAVE_X11) */ | 5107 | #endif /* ! defined (HAVE_X11) */ |
| 5108 | 5108 | ||
| 5109 | x_calc_absolute_position (f) | 5109 | x_calc_absolute_position (f, flags) |
| 5110 | struct frame *f; | 5110 | struct frame *f; |
| 5111 | int flags; | ||
| 5111 | { | 5112 | { |
| 5112 | #ifdef HAVE_X11 | 5113 | #ifdef HAVE_X11 |
| 5113 | Window win, child; | 5114 | Window win, child; |
| @@ -5134,13 +5135,13 @@ x_calc_absolute_position (f) | |||
| 5134 | 5135 | ||
| 5135 | /* Treat negative positions as relative to the leftmost bottommost | 5136 | /* Treat negative positions as relative to the leftmost bottommost |
| 5136 | position that fits on the screen. */ | 5137 | position that fits on the screen. */ |
| 5137 | if (f->display.x->left_pos < 0) | 5138 | if (flags & XNegative) |
| 5138 | f->display.x->left_pos = (x_screen_width | 5139 | f->display.x->left_pos = (x_screen_width |
| 5139 | - 2 * f->display.x->border_width - win_x | 5140 | - 2 * f->display.x->border_width - win_x |
| 5140 | - PIXEL_WIDTH (f) | 5141 | - PIXEL_WIDTH (f) |
| 5141 | + f->display.x->left_pos); | 5142 | + f->display.x->left_pos); |
| 5142 | 5143 | ||
| 5143 | if (f->display.x->top_pos < 0) | 5144 | if (flags & YNegative) |
| 5144 | f->display.x->top_pos = (x_screen_height | 5145 | f->display.x->top_pos = (x_screen_height |
| 5145 | - 2 * f->display.x->border_width - win_y | 5146 | - 2 * f->display.x->border_width - win_y |
| 5146 | - PIXEL_HEIGHT (f) | 5147 | - PIXEL_HEIGHT (f) |
| @@ -5168,7 +5169,7 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5168 | { | 5169 | { |
| 5169 | f->display.x->top_pos = yoff; | 5170 | f->display.x->top_pos = yoff; |
| 5170 | f->display.x->left_pos = xoff; | 5171 | f->display.x->left_pos = xoff; |
| 5171 | x_calc_absolute_position (f); | 5172 | x_calc_absolute_position (f, 0); |
| 5172 | 5173 | ||
| 5173 | BLOCK_INPUT; | 5174 | BLOCK_INPUT; |
| 5174 | #ifdef USE_X_TOOLKIT | 5175 | #ifdef USE_X_TOOLKIT |
| @@ -5753,19 +5754,6 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 5753 | size_hints.x = f->display.x->left_pos; | 5754 | size_hints.x = f->display.x->left_pos; |
| 5754 | size_hints.y = f->display.x->top_pos; | 5755 | size_hints.y = f->display.x->top_pos; |
| 5755 | 5756 | ||
| 5756 | /* Treat negative positions as relative to the leftmost bottommost | ||
| 5757 | position that fits on the screen. */ | ||
| 5758 | if (flags & XNegative) | ||
| 5759 | size_hints.x = (x_screen_width | ||
| 5760 | - 2 * f->display.x->border_width | ||
| 5761 | - PIXEL_WIDTH (f) | ||
| 5762 | + f->display.x->left_pos); | ||
| 5763 | if (flags & YNegative) | ||
| 5764 | size_hints.y = (x_screen_height | ||
| 5765 | - 2 * f->display.x->border_width | ||
| 5766 | - PIXEL_HEIGHT (f) | ||
| 5767 | + f->display.x->top_pos); | ||
| 5768 | |||
| 5769 | #ifdef USE_X_TOOLKIT | 5757 | #ifdef USE_X_TOOLKIT |
| 5770 | XtSetArg (al[ac], XtNwidth, &widget_width); ac++; | 5758 | XtSetArg (al[ac], XtNwidth, &widget_width); ac++; |
| 5771 | XtSetArg (al[ac], XtNheight, &widget_height); ac++; | 5759 | XtSetArg (al[ac], XtNheight, &widget_height); ac++; |