diff options
| author | Lakshmi Shanmugam | 2015-11-04 12:13:48 +0000 |
|---|---|---|
| committer | Lakshmi Shanmugam | 2015-11-04 12:16:43 +0000 |
| commit | a094f2f34315e9381b33e430a301d5b553d9ae11 (patch) | |
| tree | 4d3edb8eba9703c478ce42a14bd9a259c4c2d1e2 | |
| parent | 993faa19c73b75f1f3542e6c900bb59d8810076b (diff) | |
| download | eclipse.platform.swt-a094f2f34315e9381b33e430a301d5b553d9ae11.tar.gz eclipse.platform.swt-a094f2f34315e9381b33e430a301d5b553d9ae11.tar.xz eclipse.platform.swt-a094f2f34315e9381b33e430a301d5b553d9ae11.zip | |
Bug 477979 - [10.11] SWT can't receive input on non-standard JVMs
Use OS.NSAnyEventMask insteadof 0 in
NSApplication.nextEventMatchingMask() in Display and Tracker class.
Change-Id: Ia4f24f3e013a2fcf15e601c3297d2668505893bc
Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
4 files changed, 5 insertions, 3 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 3f9737b1b6..d8858677a4 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 @@ -4758,6 +4758,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="NSAppKitDefined" swt_gen="true"></enum> <enum name="NSApplicationActivateIgnoringOtherApps" swt_gen="true"></enum> <enum name="NSApplicationActivationPolicyRegular" 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 4a27915bce..e7cd674b0a 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 @@ -2333,6 +2333,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 NSAppKitDefined = 13; public static final int NSApplicationActivateIgnoringOtherApps = 2; public static final int NSApplicationActivationPolicyRegular = 0; 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 90f7adbdb4..483c29f4b5 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 @@ -3686,7 +3686,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 3d50aa5cc1..9bc7f005a9 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 @@ -11,9 +11,9 @@ package org.eclipse.swt.widgets; -import org.eclipse.swt.graphics.*; import org.eclipse.swt.*; import org.eclipse.swt.events.*; +import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.cocoa.*; /** @@ -844,7 +844,7 @@ public boolean open () { if (parent != null && parent.isDisposed ()) break; display.runSkin (); display.runDeferredLayouts (); - 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) { |
