mousePressed event lost after menu key pressed (on newer Android versions only?)
Issue by joshgiesbrecht
Thursday Jul 04, 2013 at 17:16 GMT
Originally opened as https://github.com/processing/processing-android-archive/issues/44
As per this on the forum: http://forum.processing.org/topic/the-mouse-event-always-be-eaten-one-by-the-menu-button
After the menu button is pressed, the next touch on the screen does not generate a mousePressed() event. (So you have to tap the screen once after turning a menu on or off before it responds normally.)
This happens on a Nexus 7 (android 4.2.something) and on an SG3 (Android 4.1.2), but it does NOT happen on my just-slightly-older Samsung Galaxy Ace iix (Android 4.0.4). So this might be only happening on devices that are 4.1 and higher. (But I've only tested on these three devices so far.)
Edit: It's not only mousePressed events that disappear. Keypress events can also be lost. eg. After pressing Menu, the next tap of Menu is ignored, and then after that the next whatever will happen normally. Same with the back button after pressing Menu.
Comment by joshgiesbrecht
Saturday Mar 29, 2014 at 15:42 GMT
Spent time on this lately. Discovered that the Menu button press causes the Activity's Window (not View, but Window) to lose focus. The next tap is used up regaining that Window's focus.
I don't know yet why the Window is losing focus, but still hunting today. Does Processing have an invisible / empty Menu object anywhere that might be getting activated? (Doesn't make any sense, but I don't know what else to look for here)
Hi, I am doing an App in Processing for Android. Is someone using Android 4.1+ with Processing and working fine? This was 2 years ago, I can't believe this still doesn't work...