Merge
authorlana
Mon, 21 Jun 2010 22:05:11 -0700
changeset 5761 2a67809d309f
parent 5756 ccdd5a0c48a4 (current diff)
parent 5760 4177643566d5 (diff)
child 5770 b8ab8c6db9a6
Merge
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/jdk/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/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/jdk/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/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c	Mon Jun 21 22:04:23 2010 -0700
+++ b/jdk/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/jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Mon Jun 21 22:04:23 2010 -0700
+++ b/jdk/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");