Revision: 3855 http://vexi.svn.sourceforge.net/vexi/?rev=3855&view=rev Author: clrg Date: 2010-06-28 13:59:27 +0000 (Mon, 28 Jun 2010)
Log Message: ----------- Fix Release events not getting fired on Surface root if mouse is outside root + minor code cleaning Modified Paths: -------------- branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Surface.java Modified: branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Surface.java =================================================================== --- branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Surface.java 2010-06-24 15:50:45 UTC (rev 3854) +++ branches/vexi3_old_build/core/org.vexi.core/src/org/vexi/core/Surface.java 2010-06-28 13:59:27 UTC (rev 3855) @@ -50,7 +50,8 @@ * */ -/** A Surface, as described in the Vexi Reference. +/** + * A Surface, as described in the Vexi Reference. * * Platform subclasses should include an inner class subclass of * Surface to return from the Platform._createSurface() method @@ -171,6 +172,9 @@ protected final void Maximized(boolean b) { maximized = b; message(SC_Maximized, b ? JSU.T : JSU.F); } protected final void Focused(boolean b) { if (!b) { + // REMARK need to unset these here because it becomes + // tough to detect whether they are still true when a + // surface becomes refocused - better safe than wrong alt = control = shift = false; button1 = button2 = button3 = false; } @@ -208,18 +212,18 @@ switch (button) { case 1: button1 = false; - message(SC_Release1, SC__Release1, JSU.T); + message(SC_Release1, SC__Release1, JSU.T, true); break; case 2: button2 = false; - message(SC_Release2, SC__Release2, JSU.T); + message(SC_Release2, SC__Release2, JSU.T, true); break; case 3: button3 = false; - message(SC_Release3, SC__Release3, JSU.T); + message(SC_Release3, SC__Release3, JSU.T, true); break; default: - message(JSU.S("Release"+button), JSU.S("_Release"+button), JSU.T); + message(JSU.S("Release"+button), JSU.S("_Release"+button), JSU.T, true); } // invoke Click if platform requires it and release is sufficiently close to release @@ -338,8 +342,8 @@ private JS value; private boolean forceOnRoot; public Object run(Object o) throws Exception { - // no preevent JS means a single trigger on the root box if (preevent==null) { + // no preevent JS means a single trigger on the root box JS ret = surface.root.justTriggerTraps(event, value); if (Interpreter.CASCADE_PREVENTED != ret && (event==SC_Close)) { surface.dispose(true); @@ -534,7 +538,6 @@ /** only run if scheduled */ public Object run(Object o) { - // TODO: document this in the reference if (resizable == Box.testShrink(root)) { resizable = !Box.testShrink(root); setResizable(resizable); @@ -679,8 +682,8 @@ /** runs the pre-render() and render() pipelines in the root Box to regenerate the backbuffer, then blits it to the screen */ public synchronized void render() { scheduled = false; - if (minimized) { - abort = false; + if (minimized) { + abort = false; return; } // make sure the root is properly sized This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn