changeset 11901:8ecc60a02138

(x_set_offset): Add border_width when calling XMoveWindow.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 May 1995 04:54:34 +0000
parents 54186a96c5b2
children fab32f80adf5
files src/xterm.c
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Wed May 24 04:54:16 1995 +0000
+++ b/src/xterm.c	Wed May 24 04:54:34 1995 +0000
@@ -4798,6 +4798,8 @@
      register int xoff, yoff;
      int change_gravity;
 {
+  int modified_top, modified_left;
+
   if (change_gravity)
     {
       f->display.x->top_pos = yoff;
@@ -4814,12 +4816,22 @@
   BLOCK_INPUT;
   x_wm_set_size_hint (f, 0, 0);
 
+  /* It is a mystery why we need to add the border_width here
+     when the frame is already visible, but experiment says we do.  */
+  modified_left = f->display.x->left_pos;
+  modified_top = f->display.x->top_pos;
+  if (change_gravity)
+    {
+      modified_left += f->display.x->border_width;
+      modified_top += f->display.x->border_width;
+    }
+
 #ifdef USE_X_TOOLKIT
   XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
-	       f->display.x->left_pos, f->display.x->top_pos);
+	       modified_left, modified_top);
 #else /* not USE_X_TOOLKIT */
   XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-	       f->display.x->left_pos, f->display.x->top_pos);
+	       modified_left, modified_top);
 #endif /* not USE_X_TOOLKIT */
   UNBLOCK_INPUT;
 }