changeset 2450:ae16c200341a

Merge
author lana
date Mon, 21 Jun 2010 22:05:11 -0700
parents 31d25fccdf1c 05eb107d6891
children aaa62c1f221e
files
diffstat 4 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Mon Jun 21 22:05:11 2010 -0700
@@ -275,7 +275,7 @@
         Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
                                                           XToolkit.getDefaultRootWindow(),
                                                           new Point(0, 0));
-        return absoluteLoc.x;
+        return absoluteLoc != null ? absoluteLoc.x : 0;
     }
 
     public int getAbsoluteY()
@@ -283,7 +283,7 @@
         Point absoluteLoc = XlibUtil.translateCoordinates(getWindow(),
                                                           XToolkit.getDefaultRootWindow(),
                                                           new Point(0, 0));
-        return absoluteLoc.y;
+        return absoluteLoc != null ? absoluteLoc.y : 0;
     }
 
     public int getWidth() {
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java	Mon Jun 21 22:05:11 2010 -0700
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -849,7 +849,7 @@
                     // if _NET_WM_STRUT_PARTIAL is present, we should use its values to detect
                     // if the struts area intersects with screenBounds, however some window
                     // 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.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
@@ -1961,7 +1961,7 @@
     }
 
     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
--- a/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Mon Jun 21 22:04:23 2010 -0700
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Mon Jun 21 22:05:11 2010 -0700
@@ -52,11 +52,15 @@
 {
     if (dialog != NULL)
     {
+        fp_gdk_threads_enter();
+
         fp_gtk_widget_hide (dialog);
         fp_gtk_widget_destroy (dialog);
 
         fp_gtk_main_quit ();
         dialog = NULL;
+
+        fp_gdk_threads_leave();
     }
 }
 
@@ -162,7 +166,6 @@
         (*env)->GetJavaVM(env, &jvm);
     }
 
-    fp_gdk_threads_init();
     fp_gdk_threads_enter();
 
     const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
--- a/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Mon Jun 21 22:05:11 2010 -0700
@@ -83,6 +83,12 @@
         if (fd == null) {
             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();
         if (!filter_was_called) {
             throw new RuntimeException("Filter was not called");