8156185: JDK-8024858 (long tooltip delay) is not fixed but is easily fixed
Reviewed-by: serb, alexsch
--- 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;
}
}