# HG changeset patch # User Karl Heuer # Date 801731578 0 # Node ID bfdf35b8c34b904422a809a25d9502d4e4e298f7 # Parent 20bc5df6b9384cf27a9390b17d0989fcd4e6d83f (x_report_frame_params): Report top and left in a way that represents negative offsets correctly. diff -r 20bc5df6b938 -r bfdf35b8c34b src/xfns.c --- 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,