Author: junrue Date: Thu May 18 15:05:02 2006 New Revision: 137
Modified: trunk/src/uitoolkit/widgets/panel.lisp trunk/src/uitoolkit/widgets/widget.lisp Log: avoid z-order change when location or size setf functions are called; override compute-outer-size for panels to simply return the desired client size
Modified: trunk/src/uitoolkit/widgets/panel.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/panel.lisp (original) +++ trunk/src/uitoolkit/widgets/panel.lisp Thu May 18 15:05:02 2006 @@ -49,6 +49,10 @@ ;;; methods ;;;
+(defmethod compute-outer-size ((self panel) desired-client-size) + (declare (ignore self)) + (gfs:copy-size desired-client-size)) + (defmethod compute-style-flags ((self panel) &rest extra-data) (declare (ignore extra-data)) (let ((std-flags (logior gfs::+ws-child+ gfs::+ws-visible+)))
Modified: trunk/src/uitoolkit/widgets/widget.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/widget.lisp (original) +++ trunk/src/uitoolkit/widgets/widget.lisp Thu May 18 15:05:02 2006 @@ -202,7 +202,7 @@ (gfs:point-x pnt) (gfs:point-y pnt) 0 0 - gfs::+swp-nosize+)) + (logior gfs::+swp-nosize+ gfs::+swp-nozorder+))) (error 'gfs:win32-error :detail "set-window-pos failed")))
(defmethod owner ((self widget)) @@ -270,21 +270,22 @@ (defmethod size ((w widget)) (client-size w))
-(defmethod (setf size) :before ((sz gfs:size) (w widget)) - (declare (ignore sz)) +(defmethod (setf size) :before ((size gfs:size) (w widget)) + (declare (ignore size)) (if (gfs:disposed-p w) (error 'gfs:disposed-error)))
-(defmethod (setf size) ((sz gfs:size) (w widget)) +(defmethod (setf size) ((size gfs:size) (w widget)) (if (gfs:disposed-p w) (error 'gfs:disposed-error)) (if (zerop (gfs::set-window-pos (gfs:handle w) (cffi:null-pointer) 0 0 - (gfs:size-width sz) - (gfs:size-height sz) - gfs::+swp-nomove+)) - (error 'gfs:win32-error :detail "set-window-pos failed"))) + (gfs:size-width size) + (gfs:size-height size) + (logior gfs::+swp-nomove+ gfs::+swp-nozorder+))) + (error 'gfs:win32-error :detail "set-window-pos failed")) + size)
(defmethod show :before ((w widget) flag) (declare (ignore flag))