Update of /project/mcclim/cvsroot/mcclim/Experimental In directory common-lisp.net:/tmp/cvs-serv30589
Modified Files: menu-choose.lisp Log Message: Remove usage of exit-window variable, which was totally wrong and made it difficult to exit via clicking outside the menu. I don't think this breaks what Tim Moore was trying to accomplish, for which switching from :presentation-button-press to :presentation-button-release should be sufficient.
Note that I still think this menu implementation should go away and be replaced with the one in McCLIM/menu.lisp, if possible. :)
Date: Tue Jan 25 20:29:07 2005 Author: ahefner
Index: mcclim/Experimental/menu-choose.lisp diff -u mcclim/Experimental/menu-choose.lisp:1.15 mcclim/Experimental/menu-choose.lisp:1.16 --- mcclim/Experimental/menu-choose.lisp:1.15 Tue Jan 11 06:39:02 2005 +++ mcclim/Experimental/menu-choose.lisp Tue Jan 25 20:29:06 2005 @@ -266,24 +266,16 @@ :width x2 :height y2 :resize-frame t))) - ;; Eat pointer release event so it isn't fed spuriously to another - ;; command entering its own tracking-pointer loop. - (let ((*pointer-documentation-output* pointer-documentation) - (exit-menu nil)) + (let ((*pointer-documentation-output* pointer-documentation)) (tracking-pointer (menu :context-type presentation-type :multiple-window t :highlight t) - (:presentation (&key presentation) - (setq exit-menu t)) - (:pointer-button-release (&key event x y) ; Pointer clicked outside menu? - ; Close the menu. - (when exit-menu - (unless (and (sheet-ancestor-p (event-sheet event) menu) - (region-contains-position-p (sheet-region menu) x y)) - (return-from menu-choose-from-drawer (values nil))))) + (:pointer-button-press (&key event x y) ; Close if pointer clicked outside menu. + (unless (and (sheet-ancestor-p (event-sheet event) menu) + (region-contains-position-p (sheet-region menu) x y)) + (return-from menu-choose-from-drawer (values nil)))) (:presentation-button-release (&key event presentation x y) (if (and (sheet-ancestor-p (event-sheet event) menu) (region-contains-position-p (sheet-region menu) x y)) (return-from menu-choose-from-drawer (values (presentation-object presentation) event)) (return-from menu-choose-from-drawer (values nil))))))) -