summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2013-01-21 15:01:26 -0500
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-01-21 15:02:29 -0500
commitd3b70aad7149876ba42093794d2909bb52409b12 (patch)
treec74cc726ef0873872246aabfe3aa1c5f12353496 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
parentfbb292af69fce7799a14de7c3256ae3196bbbc23 (diff)
downloadeclipse.platform.swt-d3b70aad7149876ba42093794d2909bb52409b12.tar.gz
eclipse.platform.swt-d3b70aad7149876ba42093794d2909bb52409b12.tar.xz
eclipse.platform.swt-d3b70aad7149876ba42093794d2909bb52409b12.zip
Bug 398046 - ToolTip takes a very long time to show when tooltip message is very long
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 152aa3bc5f..d1a6cf1457 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -1167,6 +1167,15 @@ String toolTipText (NMTTDISPINFO hdr) {
if (toolTip != null) {
string = toolTip.message;
if (string == null || string.length () == 0) string = " ";
+ /*
+ * Bug in Windows. On Windows 7, tool tips hang when displaying large
+ * unwrapped strings. The fix is to wrap the string ourselves.
+ */
+ if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+ if (string.length () > TOOLTIP_LIMIT / 4) {
+ string = display.wrapText (string, handle, toolTip.getWidth ());
+ }
+ }
}
return string;
}