Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv6996
Modified Files:
sheets.lisp
Log Message:
Magic number elimination #2:
In sheet-mirror-region, do what the comment already claimed it does:
Ask the backend for mirror sizes if the frontend does not have a cached
value.
Previously, width and height were returned as 65536, a completely bogus
value. This was presumably because the CLX backend started out with the
too-small 100x100 size.
--- /project/mcclim/cvsroot/mcclim/sheets.lisp 2006/05/05 10:24:02 1.51
+++ /project/mcclim/cvsroot/mcclim/sheets.lisp 2006/11/05 15:40:15 1.52
@@ -671,17 +671,16 @@
;; the server, since it is not under our control.
((or (null (sheet-parent sheet))
(null (sheet-parent (sheet-parent sheet))))
- (make-rectangle* 0 0 #x10000 #x10000)
- #+nil
(make-rectangle* 0 0
(port-mirror-width (port sheet) sheet)
(port-mirror-height (port sheet) sheet)))
(t
;; For other sheets just use the calculated value, saves a round trip.
(or (%sheet-mirror-region sheet)
- ;; XXX what to do if the sheet has no idea about its region?
- ;; XXX can we consider calling sheet-mirror-region then an error?
- (make-rectangle* 0 0 #x10000 #x10000) ))))
+ ;; ... unless we don't have it yet.
+ (make-rectangle* 0 0
+ (port-mirror-width (port sheet) sheet)
+ (port-mirror-height (port sheet) sheet)) ))))
(defmethod sheet-native-transformation ((sheet mirrored-sheet-mixin))
;; XXX hm...