Mercurial > emacs
comparison src/xfns.c @ 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 | f9b853c18bb5 |
children | 0deb4505c0f0 |
comparison
equal
deleted
inserted
replaced
11985:20bc5df6b938 | 11986:bfdf35b8c34b |
---|---|
979 x_report_frame_params (f, alistptr) | 979 x_report_frame_params (f, alistptr) |
980 struct frame *f; | 980 struct frame *f; |
981 Lisp_Object *alistptr; | 981 Lisp_Object *alistptr; |
982 { | 982 { |
983 char buf[16]; | 983 char buf[16]; |
984 | 984 Lisp_Object tem; |
985 store_in_alist (alistptr, Qleft, make_number (f->display.x->left_pos)); | 985 |
986 store_in_alist (alistptr, Qtop, make_number (f->display.x->top_pos)); | 986 /* Represent negative positions (off the top or left screen edge) |
987 in a way that Fmodify_frame_parameters will understand correctly. */ | |
988 XSETINT (tem, f->display.x->left_pos); | |
989 if (f->display.x->left_pos >= 0) | |
990 store_in_alist (alistptr, Qleft, tem); | |
991 else | |
992 store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil))); | |
993 | |
994 XSETINT (tem, f->display.x->top_pos); | |
995 if (f->display.x->top_pos >= 0) | |
996 store_in_alist (alistptr, Qtop, tem); | |
997 else | |
998 store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil))); | |
999 | |
987 store_in_alist (alistptr, Qborder_width, | 1000 store_in_alist (alistptr, Qborder_width, |
988 make_number (f->display.x->border_width)); | 1001 make_number (f->display.x->border_width)); |
989 store_in_alist (alistptr, Qinternal_border_width, | 1002 store_in_alist (alistptr, Qinternal_border_width, |
990 make_number (f->display.x->internal_border_width)); | 1003 make_number (f->display.x->internal_border_width)); |
991 sprintf (buf, "%ld", (long) FRAME_X_WINDOW (f)); | 1004 sprintf (buf, "%ld", (long) FRAME_X_WINDOW (f)); |