8156185: JDK-8024858 (long tooltip delay) is not fixed but is easily fixed
authorssadetsky
Fri, 10 Jun 2016 13:05:49 +0300
changeset 39514 353b1c8d1149
parent 39513 94c4de9f58da
child 39515 5f9e9e8bf57b
8156185: JDK-8024858 (long tooltip delay) is not fixed but is easily fixed Reviewed-by: serb, alexsch
jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Fri Jun 10 15:28:49 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Fri Jun 10 13:05:49 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -231,12 +231,10 @@
         GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
         GraphicsDevice devices[] = env.getScreenDevices();
         for (GraphicsDevice device : devices) {
-            GraphicsConfiguration configs[] = device.getConfigurations();
-            for (GraphicsConfiguration config : configs) {
-                Rectangle rect = config.getBounds();
-                if (rect.contains(toFind)) {
-                    return config;
-                }
+            GraphicsConfiguration config = device.getDefaultConfiguration();
+            Rectangle rect = config.getBounds();
+            if (rect.contains(toFind)) {
+                return config;
             }
         }