changeset 11986:bfdf35b8c34b

(x_report_frame_params): Report top and left in a way that represents negative offsets correctly.
author Karl Heuer <kwzh@gnu.org>
date Mon, 29 May 1995 07:12:58 +0000
parents 20bc5df6b938
children 9619c1121b43
files src/xfns.c
diffstat 1 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Mon May 29 07:07:40 1995 +0000
+++ b/src/xfns.c	Mon May 29 07:12:58 1995 +0000
@@ -981,9 +981,22 @@
      Lisp_Object *alistptr;
 {
   char buf[16];
-
-  store_in_alist (alistptr, Qleft, make_number (f->display.x->left_pos));
-  store_in_alist (alistptr, Qtop, make_number (f->display.x->top_pos));
+  Lisp_Object tem;
+
+  /* Represent negative positions (off the top or left screen edge)
+     in a way that Fmodify_frame_parameters will understand correctly.  */
+  XSETINT (tem, f->display.x->left_pos);
+  if (f->display.x->left_pos >= 0)
+    store_in_alist (alistptr, Qleft, tem);
+  else
+    store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil)));
+
+  XSETINT (tem, f->display.x->top_pos);
+  if (f->display.x->top_pos >= 0)
+    store_in_alist (alistptr, Qtop, tem);
+  else
+    store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil)));
+
   store_in_alist (alistptr, Qborder_width,
        	   make_number (f->display.x->border_width));
   store_in_alist (alistptr, Qinternal_border_width,