< prev index next >
modules/javafx.graphics/src/main/native-glass/gtk/GlassWindow.cpp
Print this page
*** 80,91 ****
JNIEXPORT jlong JNICALL Java_com_sun_glass_ui_gtk_GtkWindow__1createWindow
(JNIEnv * env, jobject obj, jlong owner, jlong screen, jint mask)
{
(void)env;
WindowContext* ctx = new WindowContextTop(obj,
! (WindowContext*)JLONG_TO_PTR(owner),
screen,
glass_mask_to_window_frame_type(mask),
glass_mask_to_window_type(mask),
glass_mask_to_wm_function(mask)
);
--- 80,93 ----
JNIEXPORT jlong JNICALL Java_com_sun_glass_ui_gtk_GtkWindow__1createWindow
(JNIEnv * env, jobject obj, jlong owner, jlong screen, jint mask)
{
(void)env;
+ WindowContext* parent = JLONG_TO_WINDOW_CTX(owner);
+
WindowContext* ctx = new WindowContextTop(obj,
! parent,
screen,
glass_mask_to_window_frame_type(mask),
glass_mask_to_window_type(mask),
glass_mask_to_wm_function(mask)
);
*** 106,118 ****
GdkWindow *parent_window = NULL;
GtkWidget *parent_widget = NULL;
WindowContextPlug *parent_ctx = NULL;
WindowContext *ctx = NULL;
parent_window = gdk_x11_window_lookup_for_display(
gdk_display_get_default(),
! (GdkNativeWindow)PTR_TO_JLONG(owner));
if (parent_window != NULL) {
parent_ctx = (WindowContextPlug *)g_object_get_data(G_OBJECT(parent_window), GDK_WINDOW_DATA_CONTEXT);
// HACK: do not use get_gtk_window()
// the method is intended to return GtkWindow that can be used for FileChooser
--- 108,122 ----
GdkWindow *parent_window = NULL;
GtkWidget *parent_widget = NULL;
WindowContextPlug *parent_ctx = NULL;
WindowContext *ctx = NULL;
+ WindowContext* parent = JLONG_TO_WINDOW_CTX(owner);
+
parent_window = gdk_x11_window_lookup_for_display(
gdk_display_get_default(),
! GDK_WINDOW_XID(ctx->get_gdk_window()));
if (parent_window != NULL) {
parent_ctx = (WindowContextPlug *)g_object_get_data(G_OBJECT(parent_window), GDK_WINDOW_DATA_CONTEXT);
// HACK: do not use get_gtk_window()
// the method is intended to return GtkWindow that can be used for FileChooser
< prev index next >