Revision: 3856 http://vexi.svn.sourceforge.net/vexi/?rev=3856&view=rev Author: clrg Date: 2010-06-28 14:08:32 +0000 (Mon, 28 Jun 2010)
Log Message: ----------- Fix Release events not getting fired on Surface root if mouse is outside root + minor code cleaning (from old_build branch) Modified Paths: -------------- trunk/core/org.vexi.core/src/main/java/org/vexi/core/Surface.java Modified: trunk/core/org.vexi.core/src/main/java/org/vexi/core/Surface.java =================================================================== --- trunk/core/org.vexi.core/src/main/java/org/vexi/core/Surface.java 2010-06-28 13:59:27 UTC (rev 3855) +++ trunk/core/org.vexi.core/src/main/java/org/vexi/core/Surface.java 2010-06-28 14:08:32 UTC (rev 3856) @@ -49,7 +49,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 @@ -170,6 +171,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; } @@ -207,18 +211,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 @@ -337,8 +341,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); @@ -533,7 +537,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); @@ -678,8 +681,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