CVSROOT: /sources/gnash Module name: gnash Changes by: Benjamin Wolsey <bwy> 07/10/10 07:45:28
Modified files: . : ChangeLog gui : gui.cpp server/asobj : Key.cpp Key.h Log message: * gui/gui.cpp: only handle GUI shortcuts on key down. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4585&r2=1.4586 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.107&r2=1.108 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Key.cpp?cvsroot=gnash&r1=1.37&r2=1.38 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Key.h?cvsroot=gnash&r1=1.27&r2=1.28 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4585 retrieving revision 1.4586 diff -u -b -r1.4585 -r1.4586 --- ChangeLog 10 Oct 2007 07:15:09 -0000 1.4585 +++ ChangeLog 10 Oct 2007 07:45:27 -0000 1.4586 @@ -1,3 +1,7 @@ +2007-10-10 Benjamin Wolsey <[EMAIL PROTECTED]> + + * gui/gui.cpp: only handle GUI shortcuts on key down. + 2007-10-10 Sandro Santilli <[EMAIL PROTECTED]> * server/parser/action_buffer.cpp (process_decl_dict): allow Index: gui/gui.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/gui.cpp,v retrieving revision 1.107 retrieving revision 1.108 diff -u -b -r1.107 -r1.108 --- gui/gui.cpp 8 Oct 2007 16:49:16 -0000 1.107 +++ gui/gui.cpp 10 Oct 2007 07:45:28 -0000 1.108 @@ -362,6 +362,7 @@ movie_root* m = _stage; /* Handle GUI shortcuts */ + if (pressed) { if (modifier & gnash::key::MOD_CONTROL) { switch(k) { case gnash::key::r: @@ -392,6 +393,7 @@ break; } } + } if ( ! _started ) return; Index: server/asobj/Key.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Key.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -u -b -r1.37 -r1.38 --- server/asobj/Key.cpp 9 Oct 2007 12:48:43 -0000 1.37 +++ server/asobj/Key.cpp 10 Oct 2007 07:45:28 -0000 1.38 @@ -98,9 +98,14 @@ { if (code < 0 || code >= key::KEYCOUNT) return; - // This is used for getAscii() of the last key event, so we use gnash's - // internal code. + // This is used for getAscii() of the last key event up to + // SWF7, so we use gnash's internal code. + + VM& vm = VM::get(); + if ( vm.getSWFVersion() < 8 ) + { m_last_key_event = code; + } // Key.isDown() only cares about flash keycode, not character, so // we lookup keycode to add to m_unreleased_keys. @@ -205,7 +210,7 @@ #endif // ndef NEW_KEY_LISTENER_LIST_DESIGN int -key_as_object::get_last_key_pressed() const +key_as_object::get_last_key() const { return m_last_key_event; } @@ -255,7 +260,7 @@ { boost::intrusive_ptr<key_as_object> ko = ensureType<key_as_object>(fn.this_ptr); - int code = ko->get_last_key_pressed(); + int code = ko->get_last_key(); return as_value(gnash::key::codeMap[code][2]); } @@ -266,7 +271,7 @@ { boost::intrusive_ptr<key_as_object> ko = ensureType<key_as_object>(fn.this_ptr); - int code = ko->get_last_key_pressed(); + int code = ko->get_last_key(); return as_value(key::codeMap[code][1]); } Index: server/asobj/Key.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/Key.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- server/asobj/Key.h 9 Oct 2007 12:48:44 -0000 1.27 +++ server/asobj/Key.h 10 Oct 2007 07:45:28 -0000 1.28 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: Key.h,v 1.27 2007/10/09 12:48:44 bwy Exp $ */ +/* $Id: Key.h,v 1.28 2007/10/10 07:45:28 bwy Exp $ */ #ifndef __KEY_H__ #define __KEY_H__ @@ -101,7 +101,7 @@ void remove_listener(boost::intrusive_ptr<as_object> listener); #endif - int get_last_key_pressed() const; + int get_last_key() const; }; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit