About JDK-8193502

Thiago Milczarek Sayao thiago.sayao at clamed.com.br
Thu Apr 25 02:06:23 UTC 2019


I have located this bug:
https://bugs.openjdk.java.net/browse/JDK-8193502

It's on glass_window.cpp on this function below. For some reason width is 1 and height is 1, causing error on the DialogPane layout calculations.

I lack understanding of this as a whole. Anyone got ideas?

According to gtk docs, this gtk_window_get_size should not be here:
https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-size

bool WindowContextBase::set_view(jobject view) {

    if (jview) {
        mainEnv->CallVoidMethod(jview, jViewNotifyMouse,
                com_sun_glass_events_MouseEvent_EXIT,
                com_sun_glass_events_MouseEvent_BUTTON_NONE,
                0, 0,
                0, 0,
                0,
                JNI_FALSE,
                JNI_FALSE);
        mainEnv->DeleteGlobalRef(jview);
    }

    if (view) {
        gint width, height;
        jview = mainEnv->NewGlobalRef(view);

        ///->>>>>> HERE
        gtk_window_get_size(GTK_WINDOW(gtk_widget), &width, &height);
        mainEnv->CallVoidMethod(view, jViewNotifyResize, width, height);
        CHECK_JNI_EXCEPTION_RET(mainEnv, FALSE)
    } else {
        jview = NULL;
    }
    return TRUE;
}


More information about the openjfx-dev mailing list