diff src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c @ 3225:4becb3dd7861

6998592: FileDialog tests crashed on solaris Summary: Override GtkFileDialogPeer.toFront() Reviewed-by: art, dcherepanov
author anthony
date Tue, 30 Nov 2010 17:36:56 +0300
parents 9c7c5ecea41a
children 78364959fc73
line wrap: on
line diff
--- a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Fri Nov 26 15:52:55 2010 +0300
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Tue Nov 30 17:36:56 2010 +0300
@@ -80,6 +80,28 @@
     quit(env, jpeer, FALSE);
 }
 
+/*
+ * Class:     sun_awt_X11_GtkFileDialogPeer
+ * Method:    toFront
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
+(JNIEnv * env, jobject jpeer)
+{
+    GtkWidget * dialog;
+
+    fp_gdk_threads_enter();
+
+    dialog = (GtkWidget*)jlong_to_ptr(
+            (*env)->GetLongField(env, jpeer, widgetFieldID));
+
+    if (dialog != NULL) {
+        fp_gtk_window_present((GtkWindow*)dialog);
+    }
+
+    fp_gdk_threads_leave();
+}
+
 /**
  * Convert a GSList to an array of filenames (without the parent folder)
  */