Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2006-08-01 21:04:58 +0000
committerFelipe Heidrich2006-08-01 21:04:58 +0000
commite05e6f1607761cf74612128ec782d3e355b7bb8b (patch)
tree5dfb8d2cccdba83516fc12401ded3bf98f4a5f03 /bundles
parent1841ce6c90717940666796a37517bf371785be19 (diff)
downloadeclipse.platform.swt-e05e6f1607761cf74612128ec782d3e355b7bb8b.tar.gz
eclipse.platform.swt-e05e6f1607761cf74612128ec782d3e355b7bb8b.tar.xz
eclipse.platform.swt-e05e6f1607761cf74612128ec782d3e355b7bb8b.zip
146303 - Label Tooltip text not visible on Intel Mac
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java7
4 files changed, 16 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
index 05733c3ee5..271af8517f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
@@ -1202,7 +1202,7 @@ boolean hasFocus () {
int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) {
switch (inRequest) {
case OS.kHMSupplyContent: {
- int [] contentProvided = new int [] {OS.kHMContentNotProvidedDontPropagate};
+ short [] contentProvided = {OS.kHMContentNotProvidedDontPropagate};
if (toolTipText != null && toolTipText.length () != 0) {
char [] buffer = new char [toolTipText.length ()];
toolTipText.getChars (0, buffer.length, buffer, 0);
@@ -1226,8 +1226,10 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
*/
int cursorHeight = 16;
helpContent.tagSide = (short) OS.kHMAbsoluteCenterAligned;
- int x = (short) (inGlobalMouse & 0xFFFF);
- int y = (short) (inGlobalMouse >> 16);
+ org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();
+ OS.memcpy(pt, new int[] {inGlobalMouse}, 4);
+ int x = pt.h;
+ int y = pt.v;
if (display.helpWidget != this) {
display.lastHelpX = x + cursorHeight / 2;
display.lastHelpY = y + cursorHeight + cursorHeight / 2;
@@ -1252,7 +1254,7 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
OS.memcpy (ioHelpContent, helpContent, HMHelpContentRec.sizeof);
contentProvided [0] = OS.kHMContentProvided;
}
- OS.memcpy (outContentProvided, contentProvided, 4);
+ OS.memcpy (outContentProvided, contentProvided, 2);
break;
}
case OS.kHMDisposeContent: {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
index fa2c3ab64d..0cc7eff924 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
@@ -1773,8 +1773,9 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect);
short windowLeft = rect.left, windowTop = rect.top;
org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();
- pt.h = (short) ((inGlobalMouse & 0xFFFF) - windowLeft);
- pt.v = (short) ((inGlobalMouse >> 16) - windowTop);
+ OS.memcpy(pt, new int[] {inGlobalMouse}, 4);
+ pt.h -= windowLeft;
+ pt.v -= windowTop;
if (!contains (pt.h, pt.v)) break;
String toolTipText = null;
int tagSide = OS.kHMAbsoluteCenterAligned;
@@ -1882,7 +1883,7 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
helpContent.content1_contentType = OS.kHMCFStringContent;
helpContent.content1_tagCFString = display.helpString;
OS.memcpy (ioHelpContent, helpContent, HMHelpContentRec.sizeof);
- OS.memcpy (outContentProvided, new int[]{OS.kHMContentProvided}, 4);
+ OS.memcpy (outContentProvided, new short[]{OS.kHMContentProvided}, 2);
return OS.noErr;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
index 013e4178c2..5ea3357a1f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
@@ -596,7 +596,7 @@ int getVisibleRegion (int control, boolean clipChildren) {
int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) {
switch (inRequest) {
case OS.kHMSupplyContent: {
- int [] contentProvided = new int [] { OS.kHMContentNotProvided };
+ short [] contentProvided = { OS.kHMContentNotProvided };
if (toolTipText != null && toolTipText.length () != 0) {
char [] buffer = new char [toolTipText.length ()];
toolTipText.getChars (0, buffer.length, buffer, 0);
@@ -619,7 +619,7 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
OS.memcpy (ioHelpContent, helpContent, HMHelpContentRec.sizeof);
contentProvided [0] = OS.kHMContentProvided;
}
- OS.memcpy (outContentProvided, contentProvided, 4);
+ OS.memcpy (outContentProvided, contentProvided, 2);
break;
}
case OS.kHMDisposeContent: {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
index 1c2de762f4..b998434b9e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
@@ -1804,8 +1804,9 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect);
short windowLeft = rect.left, windowTop = rect.top;
org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();
- pt.h = (short) ((inGlobalMouse & 0xFFFF) - windowLeft);
- pt.v = (short) ((inGlobalMouse >> 16) - windowTop);
+ OS.memcpy(pt, new int[] {inGlobalMouse}, 4);
+ pt.h -= windowLeft;
+ pt.v -= windowTop;
if (!contains (pt.h, pt.v)) break;
String toolTipText = null;
int tagSide = OS.kHMAbsoluteCenterAligned;
@@ -1916,7 +1917,7 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
helpContent.content1_contentType = OS.kHMCFStringContent;
helpContent.content1_tagCFString = display.helpString;
OS.memcpy (ioHelpContent, helpContent, HMHelpContentRec.sizeof);
- OS.memcpy (outContentProvided, new int[]{OS.kHMContentProvided}, 4);
+ OS.memcpy (outContentProvided, new short[]{OS.kHMContentProvided}, 2);
return OS.noErr;
}
}

Back to the top