# HG changeset patch # User Richard M. Stallman # Date 767834967 0 # Node ID 68fc80bf10df41baa638ae33c7806f21757e3964 # Parent a752899939f7111352ecb92cbc807cdb0ed8a4a6 (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. diff -r a752899939f7 -r 68fc80bf10df src/xterm.c --- a/src/xterm.c Sun May 01 23:26:44 1994 +0000 +++ b/src/xterm.c Sun May 01 23:29:27 1994 +0000 @@ -5106,8 +5106,9 @@ } #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 @@ /* 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 @@ { 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 @@ 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++;