[mcclim-cvs] CVS mcclim/Backends/Graphic-Forms

junrue junrue at common-lisp.net
Sat Sep 8 23:54:49 UTC 2007


Update of /project/mcclim/cvsroot/mcclim/Backends/Graphic-Forms
In directory clnet:/tmp/cvs-serv2534

Modified Files:
	port.lisp 
Log Message:
take into account the difference between window outer size and client size when generating configuration events for top-level windows; return empty space requirements for menu bar panes because they are representing used native menu widgets

--- /project/mcclim/cvsroot/mcclim/Backends/Graphic-Forms/port.lisp	2007/09/02 19:00:07	1.6
+++ /project/mcclim/cvsroot/mcclim/Backends/Graphic-Forms/port.lisp	2007/09/08 23:54:49	1.7
@@ -169,6 +169,11 @@
 ;;; mirror methods
 ;;;
 
+(defmethod port-set-mirror-region ((port graphic-forms-port) (mirror gfw-top-level) region)
+  (let ((size (gfs:make-size :width (round-coordinate (bounding-rectangle-width region))
+                             :height (round-coordinate (bounding-rectangle-height region)))))
+    (setf (gfw:size mirror) (gfw::compute-outer-size mirror size))))
+
 (defmethod port-set-mirror-region ((port graphic-forms-port) (mirror gf-mirror-mixin) region)
   (setf (gfw:size mirror)
         (gfs:make-size :width (round-coordinate (bounding-rectangle-width region))
@@ -191,9 +196,6 @@
           (gfs:make-point :x (round-coordinate x)
                           :y (round-coordinate y)))))
 
-(defmethod port-set-mirror-transformation ((port graphic-forms-port) (mirror gfw-top-level) transformation)
-  (declare (ignore port mirror transformation)))
-
 (defmethod port-set-mirror-transformation ((port graphic-forms-port) (mirror gfw-menu) transformation)
   (declare (ignore port mirror transformation)))
 
@@ -377,6 +379,10 @@
 (defmethod send-selection ((port graphic-forms-port) event string)
   nil)
 
+(defmethod compose-space ((pane gfw-menu-bar-pane) &key width height)
+  (declare (ignore width height))
+  (make-space-requirement :width 0 :height 0))
+
 ;;;
 ;;; dispatchers and callbacks
 ;;;
@@ -433,6 +439,7 @@
 
 (defmethod gfw:event-resize ((self sheet-event-dispatcher) mirror size type)
   (declare (ignore type))
+  (setf size (gfw:client-size mirror))
   (let ((sheet (sheet mirror)))
     (if (and sheet (subtypep (class-of sheet) 'sheet-with-medium-mixin))
         (let ((medium (climi::sheet-medium sheet)))
@@ -443,7 +450,7 @@
 
 (defmethod gfw:event-move ((self sheet-event-dispatcher) mirror pnt)
   (enqueue (port self)
-           (generate-configuration-event mirror pnt (gfw:size mirror))))
+           (generate-configuration-event mirror pnt (gfw:client-size mirror))))
 
 (defclass gadget-event (window-event) ())
 (defclass button-pressed-event (gadget-event) ())




More information about the Mcclim-cvs mailing list