--- old/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c 2014-01-10 14:54:46.528228669 +0400 +++ new/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c 2014-01-10 14:54:46.384228665 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ +#include #include #include #include @@ -32,6 +33,8 @@ #include "java_awt_FileDialog.h" #include "debug_assert.h" +extern Display *awt_display; + static JavaVM *jvm; /* To cache some method IDs */ @@ -288,6 +291,7 @@ */ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer, + jlong owner, jstring jtitle, jint mode, jstring jdir, jstring jfile, jobject jfilter, jboolean multiple, int x, int y) { @@ -370,6 +374,11 @@ (*env)->SetLongField(env, jpeer, widgetFieldID, ptr_to_jlong(dialog)); + if (owner && dialog) { + fp_gtk_widget_realize(dialog); + XSetTransientForHint(awt_display, fp_gdk_x11_drawable_get_xid(dialog->window), owner); + } + fp_gtk_widget_show(dialog); fp_gtk_main();