Merge
This commit is contained in:
commit
682a3fcf9b
@ -275,7 +275,7 @@ public class XEmbeddedFramePeer extends XFramePeer {
|
|||||||
Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
|
Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
|
||||||
XToolkit.getDefaultRootWindow(),
|
XToolkit.getDefaultRootWindow(),
|
||||||
new Point(0, 0));
|
new Point(0, 0));
|
||||||
return absoluteLoc.x;
|
return absoluteLoc != null ? absoluteLoc.x : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAbsoluteY()
|
public int getAbsoluteY()
|
||||||
@ -283,7 +283,7 @@ public class XEmbeddedFramePeer extends XFramePeer {
|
|||||||
Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
|
Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
|
||||||
XToolkit.getDefaultRootWindow(),
|
XToolkit.getDefaultRootWindow(),
|
||||||
new Point(0, 0));
|
new Point(0, 0));
|
||||||
return absoluteLoc.y;
|
return absoluteLoc != null ? absoluteLoc.y : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -849,7 +849,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
|||||||
// if _NET_WM_STRUT_PARTIAL is present, we should use its values to detect
|
// if _NET_WM_STRUT_PARTIAL is present, we should use its values to detect
|
||||||
// if the struts area intersects with screenBounds, however some window
|
// if the struts area intersects with screenBounds, however some window
|
||||||
// managers don't set this hint correctly, so we just get intersection with windowBounds
|
// managers don't set this hint correctly, so we just get intersection with windowBounds
|
||||||
if (windowBounds.intersects(screenBounds))
|
if (windowBounds != null && windowBounds.intersects(screenBounds))
|
||||||
{
|
{
|
||||||
insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left);
|
insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left);
|
||||||
insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
|
insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
|
||||||
@ -1961,7 +1961,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static long reset_time_utc;
|
static long reset_time_utc;
|
||||||
static final long WRAP_TIME_MILLIS = Integer.MAX_VALUE;
|
static final long WRAP_TIME_MILLIS = 0x00000000FFFFFFFFL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function converts between the X server time (number of milliseconds
|
* This function converts between the X server time (number of milliseconds
|
||||||
|
@ -52,11 +52,15 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
|
|||||||
{
|
{
|
||||||
if (dialog != NULL)
|
if (dialog != NULL)
|
||||||
{
|
{
|
||||||
|
fp_gdk_threads_enter();
|
||||||
|
|
||||||
fp_gtk_widget_hide (dialog);
|
fp_gtk_widget_hide (dialog);
|
||||||
fp_gtk_widget_destroy (dialog);
|
fp_gtk_widget_destroy (dialog);
|
||||||
|
|
||||||
fp_gtk_main_quit ();
|
fp_gtk_main_quit ();
|
||||||
dialog = NULL;
|
dialog = NULL;
|
||||||
|
|
||||||
|
fp_gdk_threads_leave();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +166,6 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
|
|||||||
(*env)->GetJavaVM(env, &jvm);
|
(*env)->GetJavaVM(env, &jvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp_gdk_threads_init();
|
|
||||||
fp_gdk_threads_enter();
|
fp_gdk_threads_enter();
|
||||||
|
|
||||||
const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
|
const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
|
||||||
|
@ -83,6 +83,12 @@ public class FilenameFilterTest extends Applet
|
|||||||
if (fd == null) {
|
if (fd == null) {
|
||||||
throw new RuntimeException("fd is null (very unexpected thing :(");
|
throw new RuntimeException("fd is null (very unexpected thing :(");
|
||||||
}
|
}
|
||||||
|
//Wait a little; some native dialog implementations may take a while
|
||||||
|
//to initialize and call the filter. See 6959787 for an example.
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
}
|
||||||
fd.dispose();
|
fd.dispose();
|
||||||
if (!filter_was_called) {
|
if (!filter_was_called) {
|
||||||
throw new RuntimeException("Filter was not called");
|
throw new RuntimeException("Filter was not called");
|
||||||
|
Loading…
Reference in New Issue
Block a user