6998592: FileDialog tests crashed on solaris
Override GtkFileDialogPeer.toFront() Reviewed-by: art, dcherepanov
This commit is contained in:
parent
968c230489
commit
cf15a10d32
@ -432,6 +432,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_awt_X11_GtkFileDialogPeer_initIDs;
|
||||
Java_sun_awt_X11_GtkFileDialogPeer_run;
|
||||
Java_sun_awt_X11_GtkFileDialogPeer_quit;
|
||||
Java_sun_awt_X11_GtkFileDialogPeer_toFront;
|
||||
|
||||
Java_sun_print_CUPSPrinter_initIDs;
|
||||
Java_sun_print_CUPSPrinter_getCupsServer;
|
||||
|
@ -57,9 +57,12 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
|
||||
|
||||
private native void run(String title, int mode, String dir, String file,
|
||||
FilenameFilter filter, boolean isMultipleMode);
|
||||
|
||||
private native void quit();
|
||||
|
||||
@Override
|
||||
public native void toFront();
|
||||
|
||||
|
||||
/**
|
||||
* Called exclusively by the native C code.
|
||||
*/
|
||||
|
@ -607,6 +607,7 @@ gboolean gtk2_load()
|
||||
fp_gtk_tree_view_new = dl_symbol("gtk_tree_view_new");
|
||||
fp_gtk_viewport_new = dl_symbol("gtk_viewport_new");
|
||||
fp_gtk_window_new = dl_symbol("gtk_window_new");
|
||||
fp_gtk_window_present = dl_symbol("gtk_window_present");
|
||||
fp_gtk_dialog_new = dl_symbol("gtk_dialog_new");
|
||||
fp_gtk_frame_new = dl_symbol("gtk_frame_new");
|
||||
|
||||
|
@ -749,6 +749,7 @@ int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf);
|
||||
int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
|
||||
GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error);
|
||||
void (*fp_gtk_widget_destroy)(GtkWidget *widget);
|
||||
void (*fp_gtk_window_present)(GtkWindow *window);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -80,6 +80,28 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
|
||||
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)
|
||||
*/
|
||||
|
@ -33,6 +33,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_run
|
||||
JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
|
||||
(JNIEnv *, jobject);
|
||||
|
||||
/*
|
||||
* Class: sun_awt_X11_GtkFileDialogPeer
|
||||
* Method: toFront
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
|
||||
(JNIEnv *, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user