Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2015-11-04 07:13:48 -0500
committerLakshmi Shanmugam2018-01-29 01:07:11 -0500
commit3c218ea95d5a47399aa146c62df4c60ad14757d6 (patch)
tree687cfeb198520251d866f9ca2414495ac3dd889c
parent0fee7d6e8e55e138db77e426ddb35317a7eff1b2 (diff)
downloadeclipse.platform.swt-3c218ea95d5a47399aa146c62df4c60ad14757d6.tar.gz
eclipse.platform.swt-3c218ea95d5a47399aa146c62df4c60ad14757d6.tar.xz
eclipse.platform.swt-3c218ea95d5a47399aa146c62df4c60ad14757d6.zip
Bug 477979 - [10.11] SWT can't receive input on non-standard JVMs R3_7_maintenance
Use OS.NSAnyEventMask insteadof 0 in NSApplication.nextEventMatchingMask() in Display and Tracker class. Change-Id: I8c2d73a9f1006dd5516f1078d01b64f665e43a23 Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java2
4 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 82a0d94087..73d6fe05e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -4701,6 +4701,7 @@
<enum name="NSAlphaFirstBitmapFormat" swt_gen="true"></enum>
<enum name="NSAlphaNonpremultipliedBitmapFormat" swt_gen="true"></enum>
<enum name="NSAlternateKeyMask" swt_gen="true"></enum>
+ <enum name="NSAnyEventMask" swt_gen="true"></enum>
<enum name="NSApplicationDefined" swt_gen="true"></enum>
<enum name="NSApplicationDelegateReplySuccess" swt_gen="true"></enum>
<enum name="NSAtTop" swt_gen="true"></enum>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index bbdad021fe..d2a60e5b58 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -2230,6 +2230,7 @@ public static final int NSAlertThirdButtonReturn = 1002;
public static final int NSAlphaFirstBitmapFormat = 1;
public static final int NSAlphaNonpremultipliedBitmapFormat = 2;
public static final int NSAlternateKeyMask = 524288;
+public static final int NSAnyEventMask = -1;
public static final int NSApplicationDefined = 15;
public static final int NSApplicationDelegateReplySuccess = 0;
public static final int NSAtTop = 2;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 5bbba9de25..1a35c63be6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -3604,7 +3604,7 @@ public boolean readAndDispatch () {
events |= runTimers ();
events |= runContexts ();
events |= runPopups ();
- NSEvent event = application.nextEventMatchingMask(0, null, OS.NSDefaultRunLoopMode, true);
+ NSEvent event = application.nextEventMatchingMask(OS.NSAnyEventMask, null, OS.NSDefaultRunLoopMode, true);
if (event != null) {
events = true;
application.sendEvent(event);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
index fdc5a4d039..6f05253a40 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
@@ -800,7 +800,7 @@ public boolean open () {
while (tracking && !cancelled) {
display.addPool();
try {
- NSEvent event = application.nextEventMatchingMask(0, NSDate.distantFuture(), OS.NSDefaultRunLoopMode, true);
+ NSEvent event = application.nextEventMatchingMask(OS.NSAnyEventMask, NSDate.distantFuture(), OS.NSDefaultRunLoopMode, true);
if (event == null) continue;
int type = (int)/*64*/event.type();
switch (type) {

Back to the top