Hi Tomas,

I am currently running a bit different openjfx than yours and got it kind of 
running.

1. the main difference is font deactivation. You disabled the entire CSS 
renderer, which I did not.
I am deactivating just the font renderer. That means a lot more patching but it 
gives me the chance
to see CSS rendering taking place ;) It works pretty well even without fonts 
(hard coded font sizes).

2. I probably found the touch handling crash. Since I have an old Samusung 
Galaxy Tab 10.1 here 
I can assure this bug effects the device as well. It's the Platform.runLater 
bugfix. This is also quite
stable and makes it possible to play Brickbreaker ;)

3. I had to disable the new security stuff in GlassStage and GlassScene.


further testing:
================ 
Tobi, gave me his iOS/JavaFX testing tool that just displays a colored ListView 
and while it scrolls
the rendering process writes fps to stdout. This tool compiles and runs but it 
does nothing while touching.
The reason is probably that some javafx controls are still using mouse 
emulation.
I see in the iOS port that the events are fired twice at first as touch events 
and then
as mouse events. It looks like the latest change for multitouch events dropped 
the dual event 
sending. I tried to patch android.c like this:


JNIEXPORT void JNICALL 
Java_com_oracle_dalvik_FXActivity_00024InternalSurfaceView_onMultiTouchEventNative
  (JNIEnv *env, jobject jview, jint jpcount, jintArray jactions, jintArray jids,
        jintArray jtouchXs, jintArray jtouchYs) {
    ...
    (*_notifyMultiTouchEvent)(jpcount, actions, ids, touchXs, touchYs);

    if( jpcount == 1
        && (actions[0]==com_sun_glass_events_TouchEvent_TOUCH_PRESSED || 
actions[0]==com_sun_glass_events_TouchEvent_TOUCH_RELEASED) )
    {
        int pressed = 0;
        if (actions[0] == com_sun_glass_events_TouchEvent_TOUCH_PRESSED)
            pressed = com_sun_glass_events_MouseEvent_DOWN;
        else
        if (actions[0] == com_sun_glass_events_TouchEvent_TOUCH_RELEASED)
            pressed = com_sun_glass_events_MouseEvent_UP;

        LOGV(TAG, "emulate button click event - UM hacked pressed:%i x:%i 
y:%i\n", pressed, touchXs[0], touchYs[0] );
        (*_notifyButtonEvent)(pressed,
                                  com_sun_glass_events_MouseEvent_BUTTON_LEFT,
                                  touchXs[0], touchYs[0]);
    }
    ...
}


Unfortunately, it doesn't work as expected.


I have some questions:

1. Is that mouse emulation supposed to be eliminated due to the latest 
lensWindow changes? 
   I believe that must be handled in higher layers not in the input layer 
itself.

2. What is the best way to fix this issue? Reimplementing the mouse emulation 
is not a real good solution.

3. The Listview shows a scrollbar. That makes me believe that the control 
doesn't really know that it is running
in embedded mode. Maybe the mouse emulation is not possible if the embedded 
mode is correcly enabled.
Where do I enable the embedded mode? I though it is this property 
android.com.sun.javafx.isEmbedded=true. That's of course enabled
in javafx.platform.properties.

4. What is the input layer for the Dukepad? I think it's the udev 
implementation and this does pretty much the same as the current 
android implementation. I just want to have a "stable" reference to look at ;)

Probably those questions are not only for Tomas since they are pretty general.


regards
Matthias

Reply via email to