changeset 7262:68fc80bf10df

(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.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 May 1994 23:29:27 +0000
parents a752899939f7
children b7025b4bf659
files src/xterm.c
diffstat 1 files changed, 5 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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++;