1 ;;; Test geometry settings for frames
2 (defmacro check-frame-geometry (xx yy)
3 `(loop for frame in (list nil (selected-frame))
5 (assert (eq (frame-property frame 'top) ,yy))
6 (assert (eq (frame-property frame 'left) ,xx))
7 (assert (eq (frame-property frame 'top) ,yy))
8 (assert (eq (frame-property frame 'left) ,xx))
10 (list (frame-properties)
11 (frame-properties nil)
12 (frame-properties (selected-frame)))
14 (assert (eq (plist-get plist 'top) ,yy))
15 (assert (eq (plist-get plist 'left) ,xx)))))
17 (loop for (x y) in '((0 0) (1 1) (3 3) (9 9) (10 20) (20 40) (40 80) (100 200))
19 (loop for frame in (list nil (selected-frame))
21 (set-frame-properties frame `(left ,x top ,y))
22 (check-frame-geometry x y)
23 (set-frame-property frame 'top (+ y 3))
24 (check-frame-geometry x (+ y 3))
25 (set-frame-property frame 'left (+ x 3))
26 (check-frame-geometry (+ x 3) (+ y 3))))