bugzilla-daemon at freedesktop.org
2008-Dec-08 10:58 UTC
[Swfdec] [Bug 18946] New: Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 Summary: Swfdec 0.8.2 does not process key events Product: swfdec Version: unspecified Platform: All OS/Version: Linux (All) Status: NEW Severity: major Priority: high Component: library AssignedTo: swfdec at lists.freedesktop.org ReportedBy: helmut.jahns at sennheiser.com QAContact: swfdec at lists.freedesktop.org swfdec 0.8.2 does not respond to keyboard events. This problem occurres when using both the GTK player and a directfb player. The gtk-player distributed with Ubuntu 8.04 which is based on a previous library shows the same problem and can be used for reproducing. swfdec_player_do_handle_key() is invoked as a result of sending a key press message in swfdec_player_key_press() with the proper key value, therefore I assume the problem is located in further processing of the key event. Please confirm this problem by starting the simple swf file attached to this issue. It contains an OnClipEvent(keyDown) handler and should put a trace message to the console when pressing the 'cursor left' key. Playback using Gnash works fine, as well as testing it with CS4. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2008-Dec-09 12:10 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #1 from helmut.jahns at sennheiser.com 2008-12-09 04:10:21 PST --- Created an attachment (id=20955) --> (http://bugs.freedesktop.org/attachment.cgi?id=20955) Simple flash file tracing a text message when pressing 'cursor left' -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2008-Dec-11 15:05 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #2 from zou <zoulunkai at gmail.com> 2008-12-11 07:05:43 PST --- I haven't try the test with GTK(I don't use GTK). But by reviewing the swfdec source code, I think the key code translation part might need to be imporved. I suspect the function swfdec_gtk_keycode_from_hardware_keycode() doesn't work quite well on some systems. It's strange to me that someone want to translate the hardware code directly. Why not translate GdkEventKey->keyval or the unicode represented by the keyval instead? Isn't hardware keycode hardware dependent, thus not portable? To helmut.jahns: If you'd like to take a test, you may want check if function swfdec_gtk_event_to_keycode() works as expected on your platform. See file swfdec_gtk_widget.c, function swfdec_gtk_widget_key_press(), line170(git head), that's where swfdec get the key code. When you press the 'LEFT' key, the return value should be 37. Add some printings there, you should see if it works as expected. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2008-Dec-12 12:28 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #3 from helmut.jahns at sennheiser.com 2008-12-12 04:28:23 PST --- We are aware of possible conversion mismatches between keyboard keycode to swfdec keycode, but we think the problem is not related to it. The 'cursor left' keycode is converted to 37 which corresponds to SWFDEC_KEY_LEFT, and this keycode value is forwarded to swfdec_player_key_press(). -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2008-Dec-12 15:04 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #4 from helmut.jahns at sennheiser.com 2008-12-12 07:04:23 PST --- It seems there is no valid keyboard focus. In swfdec_player_do_handle_key(), there is a keypress operation executed dependent on a pointer in priv->focus, a pointer which is said do represent the keyboard focus. Although priv->has_focus is set to 'true' in swfdec_player_init(), priv->focus always remains NULL, because neither swfdec_player_set_focus() nor swfdec_player_update_focus() is invoked. The result is that klass->key_press() is not called. This is possibly the reason for the failure of processing key events ('possibly', because I could not check the right behavior). Can anyone more familiar with swfdec confirm this conclusion? Does anyone know a proper fix for it? -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2008-Dec-12 15:48 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 Benjamin Otte <otte at gnome.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Benjamin Otte <otte at gnome.org> 2008-12-12 07:48:18 PST --- Interesting. I just make sure that Swfdec (both 0.8.2 and 0.9.2) handle keyboard fine by playing the tennis game. So it looks like it's an internal issue. There's roughly infinite ways to deliver key events in Flash, among them: - Key.onKeyDown and Key.onKeyUp - MovieClip.onKeyDown and MovieClip.onKeyUp - onPress(key) events defined in the flash file - built-in keyboard handlers, like the TextField object Some of these events are triggered all the time, some are only delivered to the movieclip that has keyboard focus and then keypress delivery is probably also restricted by the security system. It seems that you've found a case that we do wrong: Delivery of onPress() events. The other stuff should still work fine. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-18 15:09 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #6 from helmut.jahns at sennheiser.com 2009-02-18 07:09:52 PST --- It turned out to be that this problem is only occuring when using OnClipEvents(keyDown). If AddListener() is used, it works fine. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-20 12:40 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #7 from zou <zoulunkai at gmail.com> 2009-02-20 04:40:06 PST --- Created an attachment (id=23130) --> (http://bugs.freedesktop.org/attachment.cgi?id=23130) patch to fix key event handling fixed hanlding key event onClipEvent(keyDown) and on(keyPress, keycode). I't would be great if anyone like to have a test. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-20 12:48 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #8 from zou <zoulunkai at gmail.com> 2009-02-20 04:48:30 PST --- The above patch only applys to git-head. But the same logic should also work for 0.8.2. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-22 03:16 UTC
[Swfdec] [Bug 18946] Swfdec 0.8.2 does not process key events
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #9 from zou <zoulunkai at gmail.com> 2009-02-21 19:16:56 PST --- Created an attachment (id=23173) --> (http://bugs.freedesktop.org/attachment.cgi?id=23173) patch updated. patch updated, to handle both onClipEvent(keyDown/keyUp) and on(keyPress, keyCode). onClipEvent(keyUp) was not handled in last patch and git-head. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-22 03:26 UTC
[Swfdec] [Bug 18946] Not all key events are processed.
http://bugs.freedesktop.org/show_bug.cgi?id=18946 zou <zoulunkai at gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Swfdec 0.8.2 does not |Not all key events are |process key events |processed. --- Comment #10 from zou <zoulunkai at gmail.com> 2009-02-21 19:26:12 PST --- Changed the title of this bug item, since it's not only 0.8.2 specific. Again, it would be nice if any one could do some tests with some little swfs that didn't work before. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.
bugzilla-daemon at freedesktop.org
2009-Feb-22 04:11 UTC
[Swfdec] [Bug 18946] Not all key events are processed.
http://bugs.freedesktop.org/show_bug.cgi?id=18946 --- Comment #11 from zou <zoulunkai at gmail.com> 2009-02-21 20:11:31 PST --- OK, tested myself, the patch to swfdec_player.c is NOT correct. The SWFDEC_EVENT_KEY_DOWN/UP event shouldn't be queued unconditionally. otherwise, each event handler might be triggered twice due to later swfdec_player_broadcast(). The problem is that for swf actors, there are two types of keyDown/up event handlers. One is defined in PlaceObject2 tags(built-in handlers), with actions like onClipEvent(keyDown); the other is defined in normal actionscript blocks, with actions like actor.onKeyDown = function () {}; Key.addListener(actor). As far as I can, there is more work to handle this situation correctly without changing the current interfaces. --zou -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug.