On Wed, 17 Mar 2021 23:05:27 GMT, Kevin Rushforth <[email protected]> wrote:
>> Fix for JDK-8092439 and JDK-8092064
>> Monocle currently hard-codes a single Screen, and the
>> `staticScreen_getScreens()` method will never return more than 1 Screen.
>>
>> This PR introduces the possibility to deal with multiple screens, which is
>> not uncommon on embedded systems. By default, the
>> `staticScreen_getScreens()` method will still return a single screen, but
>> the sub-platforms can now return multiple screens.
>>
>> The EGL subplatform will now query the low-level drivers, and if they detect
>> multiple displays, multiple `Screen` instances will be configured.
>> The low-level native implementation for getting the number of physical
>> screens and there characteristics is deferred to the real low-level
>> libraries (for example, an X11 based approach can do it in a different way
>> then a DRM based approach).
>
> modules/javafx.graphics/src/main/native-glass/monocle/egl/eglBridge.c line 92:
>
>> 90:
>> 91: JNIEXPORT jlong JNICALL
>> Java_com_sun_glass_ui_monocle_EGLScreen_nGetHandle
>> 92: (JNIEnv *env, jclass clazz, jint idx) {
>
> Since the JNI parameters are unused, it may not matter, but since this is an
> instance method, the second argument is a `jobject` not a `jclass`. The same
> issue applies to the rest. I see that you just copied a preexisting issue, so
> you might or might not want to fix it, or maybe just file a follow-on cleanup
> issue if you like.
I filed JDK-8263778 to track this. I will check the other methods as well as
part of this issue.
-------------
PR: https://git.openjdk.java.net/jfx/pull/426