CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/22 22:57:18
Modified files: . : ChangeLog server : drag_state.h movie_root.cpp movie_root.h Log message: * server/drag_state.h: add markReachableResources method * server/movie_root.{cpp,h}: mark the character being dragged as reachable. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4929&r2=1.4930 http://cvs.savannah.gnu.org/viewcvs/gnash/server/drag_state.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.127&r2=1.128 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.91&r2=1.92 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4929 retrieving revision 1.4930 diff -u -b -r1.4929 -r1.4930 --- ChangeLog 22 Nov 2007 21:45:40 -0000 1.4929 +++ ChangeLog 22 Nov 2007 22:57:18 -0000 1.4930 @@ -1,5 +1,11 @@ 2007-11-22 Sandro Santilli <[EMAIL PROTECTED]> + * server/drag_state.h: add markReachableResources method + * server/movie_root.{cpp,h}: mark the character being dragged as + reachable. + +2007-11-22 Sandro Santilli <[EMAIL PROTECTED]> + * server/as_environment.cpp (get_variable): variables paths containing slashes but no colon will be attempted to be evaluated as sprites before falling back to property lookup. Index: server/drag_state.h =================================================================== RCS file: /sources/gnash/gnash/server/drag_state.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/drag_state.h 2 Nov 2007 01:11:44 -0000 1.5 +++ server/drag_state.h 22 Nov 2007 22:57:18 -0000 1.6 @@ -15,7 +15,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: drag_state.h,v 1.5 2007/11/02 01:11:44 strk Exp $ */ +/* $Id: drag_state.h,v 1.6 2007/11/22 22:57:18 strk Exp $ */ #ifndef GNASH_DRAG_STATE_H @@ -139,6 +139,12 @@ _lock_centered(false) { } + + /// Mark character as reachable (if any) + void markReachableResources() const + { + if ( _character ) _character->setReachable(); + } }; Index: server/movie_root.cpp =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -u -b -r1.127 -r1.128 --- server/movie_root.cpp 22 Nov 2007 07:42:07 -0000 1.127 +++ server/movie_root.cpp 22 Nov 2007 22:57:18 -0000 1.128 @@ -684,7 +684,14 @@ movie_root::doMouseDrag() { character* dragChar = m_drag_state.getCharacter(); - if ( ! dragChar || dragChar->isUnloaded() ) return; // nothing to do + if ( ! dragChar ) return; // nothing to do + + if ( dragChar->isUnloaded() ) + { + // Reset drag state if dragging char was unloaded + m_drag_state.reset(); + return; + } int x, y, buttons; get_mouse_state(x, y, buttons); @@ -1262,6 +1269,9 @@ // Mark global key object if ( _keyobject ) _keyobject->setReachable(); + // Mark character being dragged, if any + m_drag_state.markReachableResources(); + // TODO: we should theoretically NOT need to mark _liveChars here // as any element in this list should be NOT unloaded and // thus marked as reachable by it's parent or properly unloaded Index: server/movie_root.h =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.h,v retrieving revision 1.91 retrieving revision 1.92 diff -u -b -r1.91 -r1.92 --- server/movie_root.h 22 Nov 2007 21:48:09 -0000 1.91 +++ server/movie_root.h 22 Nov 2007 22:57:18 -0000 1.92 @@ -15,7 +15,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: movie_root.h,v 1.91 2007/11/22 21:48:09 strk Exp $ */ +/* $Id: movie_root.h,v 1.92 2007/11/22 22:57:18 strk Exp $ */ /// \page events_handling Handling of user events /// @@ -516,6 +516,7 @@ /// - Key listeners (m_key_listeners) /// - Mouse listeners (m_mouse_listeners) /// - global Key object (_keyobject) + /// - Any character being dragged /// void markReachableResources() const; #endif // GNASH_USE_GC _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit