diff options
author | Richard M. Stallman <[email protected]> | 1994-05-01 23:29:27 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1994-05-01 23:29:27 +0000 |
commit | 20f55f9a243edeb65197495d5b7f1a6cd92f804c (patch) | |
tree | 9f2ba594fc910b39948cd7763efecf039155ff7a /src/xterm.c | |
parent | f83f10ba999c98b1f714ad6a8f6735b863a473a8 (diff) |
(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/xterm.c')
-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 ab04006976..7dc369dfc8 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5106,8 +5106,9 @@ x_new_font (f, newname) } #endif /* ! defined (HAVE_X11) */ -x_calc_absolute_position (f) +x_calc_absolute_position (f, flags) struct frame *f; + int flags; { #ifdef HAVE_X11 Window win, child; @@ -5134,13 +5135,13 @@ x_calc_absolute_position (f) /* Treat negative positions as relative to the leftmost bottommost position that fits on the screen. */ - if (f->display.x->left_pos < 0) + if (flags & XNegative) f->display.x->left_pos = (x_screen_width - 2 * f->display.x->border_width - win_x - PIXEL_WIDTH (f) + f->display.x->left_pos); - if (f->display.x->top_pos < 0) + if (flags & YNegative) f->display.x->top_pos = (x_screen_height - 2 * f->display.x->border_width - win_y - PIXEL_HEIGHT (f) @@ -5168,7 +5169,7 @@ x_set_offset (f, xoff, yoff, change_gravity) { f->display.x->top_pos = yoff; f->display.x->left_pos = xoff; - x_calc_absolute_position (f); + x_calc_absolute_position (f, 0); BLOCK_INPUT; #ifdef USE_X_TOOLKIT @@ -5753,19 +5754,6 @@ x_wm_set_size_hint (f, flags, user_position) size_hints.x = f->display.x->left_pos; size_hints.y = f->display.x->top_pos; - /* Treat negative positions as relative to the leftmost bottommost - position that fits on the screen. */ - if (flags & XNegative) - size_hints.x = (x_screen_width - - 2 * f->display.x->border_width - - PIXEL_WIDTH (f) - + f->display.x->left_pos); - if (flags & YNegative) - size_hints.y = (x_screen_height - - 2 * f->display.x->border_width - - PIXEL_HEIGHT (f) - + f->display.x->top_pos); - #ifdef USE_X_TOOLKIT XtSetArg (al[ac], XtNwidth, &widget_width); ac++; XtSetArg (al[ac], XtNheight, &widget_height); ac++; |