Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2011-09-26 09:11:08 -0400
committerLakshmi Shanmugam2011-10-27 09:49:38 -0400
commit201b8ca7b95929c38e81013b0e83dc557483eb82 (patch)
treea12d057550dbfc738fae71128f9e1d767e802647
parent54ec3ea6d79c09e5958f629d5f9c98e96a5e3b58 (diff)
downloadeclipse.platform.swt-201b8ca7b95929c38e81013b0e83dc557483eb82.tar.gz
eclipse.platform.swt-201b8ca7b95929c38e81013b0e83dc557483eb82.tar.xz
eclipse.platform.swt-201b8ca7b95929c38e81013b0e83dc557483eb82.zip
Bug 357127-Source hover does not show any source code (Fix
statemask for SWT.MouseHover)
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index fece67b98c..6ff03ac0ff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -1666,7 +1666,10 @@ void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
}
boolean setInputState (Event event, NSEvent nsEvent, int type) {
- if (nsEvent == null) return true;
+ if (nsEvent == null) {
+ nsEvent = NSApplication.sharedApplication().currentEvent();
+ if (nsEvent == null) return true;
+ }
int /*long*/ modifierFlags = nsEvent.modifierFlags();
if ((modifierFlags & OS.NSAlternateKeyMask) != 0) event.stateMask |= SWT.ALT;
if ((modifierFlags & OS.NSShiftKeyMask) != 0) event.stateMask |= SWT.SHIFT;

Back to the top