gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/server button.cpp character.h dlist.h edi...


From: Vitaly Alexeev
Subject: [Gnash-commit] gnash/server button.cpp character.h dlist.h edi...
Date: Fri, 25 Aug 2006 18:44:22 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Vitaly Alexeev <alexeev>        06/08/25 18:44:22

Modified files:
        server         : button.cpp character.h dlist.h 
                         edit_text_character.h generic_character.h 
                         movie.h sprite_instance.h 

Log message:
        fixed events handling bug. 3kines.swf is played now.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button.cpp?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/generic_character.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie.h?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.20&r2=1.21

Patches:
Index: button.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/button.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- button.cpp  24 Aug 2006 08:24:34 -0000      1.27
+++ button.cpp  25 Aug 2006 18:44:21 -0000      1.28
@@ -372,6 +372,8 @@
                get_root()->remove_keypress_listener(this);
        }
 
+       bool can_handle_mouse_event() { return true; }
+
        // called from keypress listener only
        bool on_event(event_id id)
        {

Index: character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- character.h 16 Aug 2006 14:45:28 -0000      1.14
+++ character.h 25 Aug 2006 18:44:21 -0000      1.15
@@ -145,6 +145,8 @@
     void       set_name(const char* name) { m_name = name; }
     const tu_string&   get_name() const { return m_name; }
 
+               virtual bool can_handle_mouse_event() = 0;
+
     // For edit_text support (Flash 5).  More correct way
     // is to do "text_character.text = whatever", via
     // set_member().

Index: dlist.h
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- dlist.h     17 Aug 2006 19:02:10 -0000      1.7
+++ dlist.h     25 Aug 2006 18:44:21 -0000      1.8
@@ -223,9 +223,6 @@
                it != itEnd; ++it)
        {
                DisplayItem& di = *it;
-
-               //if ( ! di.get_ptr() ) continue;
-
                if ( ! visitor(di.get_ptr()) )
                {
                        break;
@@ -247,12 +244,17 @@
 
                if ( ! visitor(di.get_ptr()) )
                {
+                       // Can so happens that the uppermost depth contains 
shape
+                       // and under it the button lays
+                       // therefore we skip empty(no events) depth
+                       if (di.get_ptr()->can_handle_mouse_event())
+                       {
                        break;
                }
        }
+       }
 }
 
-
 }
 
 

Index: edit_text_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- edit_text_character.h       25 Jul 2006 12:53:41 -0000      1.7
+++ edit_text_character.h       25 Aug 2006 18:44:21 -0000      1.8
@@ -68,6 +68,7 @@
 
        ~edit_text_character();
 
+       virtual bool can_handle_mouse_event()   {       return true; }
        virtual movie*  get_topmost_mouse_entity(float x, float y);     
        virtual bool on_event(event_id id);     
        virtual movie_root *get_root();

Index: generic_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/generic_character.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- generic_character.h 1 Jul 2006 20:44:10 -0000       1.5
+++ generic_character.h 25 Aug 2006 18:44:21 -0000      1.6
@@ -70,6 +70,8 @@
            assert(m_def);
        }
 
+       virtual bool can_handle_mouse_event()   { return false; }
+
     virtual void       display()
        {
 //                     GNASH_REPORT_FUNCTION;

Index: movie.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- movie.h     21 Aug 2006 15:26:20 -0000      1.15
+++ movie.h     25 Aug 2006 18:44:21 -0000      1.16
@@ -65,6 +65,11 @@
 /// @@@ To be obsoleted. This class is only confusing.
 struct movie : public movie_interface
 {
+       virtual bool can_handle_mouse_event()
+       {
+               return false;
+       }
+
        virtual void set_extern_movie(movie_interface* /* m */)
        {
        }

Index: sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- sprite_instance.h   24 Aug 2006 00:57:20 -0000      1.20
+++ sprite_instance.h   25 Aug 2006 18:44:21 -0000      1.21
@@ -197,7 +197,7 @@
 
 
        /// Return true if we have any mouse event handlers.
-       bool can_handle_mouse_event();
+       virtual bool can_handle_mouse_event();
 
        /// \brief
        /// Return the topmost entity that the given point




reply via email to

[Prev in Thread] Current Thread [Next in Thread]