summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe@ca.ibm.com>2011-12-06 15:58:32 -0500
committerFelipe Heidrich <felipe_heidrich@ca.ibm.com>2011-12-06 15:58:32 -0500
commit8a4f02ea26d9e4ebabb6261bea7bd4cae4eb9d59 (patch)
tree274d46212fa48f31584acdc36a1f3b312124c769 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
parenta58e34d4f0cf898530d9de1cc45cc5aed63fa29e (diff)
downloadeclipse.platform.swt-8a4f02ea26d9e4ebabb6261bea7bd4cae4eb9d59.tar.gz
eclipse.platform.swt-8a4f02ea26d9e4ebabb6261bea7bd4cae4eb9d59.tar.xz
eclipse.platform.swt-8a4f02ea26d9e4ebabb6261bea7bd4cae4eb9d59.zip
365807 - Tooltips follow cursor on old versions of GTK
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index a843557fee..25dd66065d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2446,6 +2446,17 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
char [] chars = fixMnemonic (string, false);
buffer = Converter.wcsToMbcs (null, chars, true);
}
+ int /*long*/ tipData = OS.gtk_tooltips_data_get(tipWidget);
+ if (tipData != 0) {
+ int /*long*/ oldTooltip = OS.GTK_TOOLTIPS_GET_TIP_TEXT(tipData);
+ if (string == null && oldTooltip == 0) {
+ return;
+ } else if (string != null && oldTooltip != 0) {
+ if (buffer != null) {
+ if (OS.strcmp (oldTooltip, buffer) == 0) return;
+ }
+ }
+ }
if (tooltipsHandle == 0) {
tooltipsHandle = OS.gtk_tooltips_new ();
if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);