Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2015-05-12 13:38:44 +0000
committerArun Thondapu2015-05-12 16:51:47 +0000
commit002548a3384e2694fac2c5d950888a8eea47f229 (patch)
treec2b17d7a0581548fe33f458ef19f1c94ffd27fef
parente84feaec9ce7b27fc38c8ff6438796d4fd8839e7 (diff)
downloadeclipse.platform.swt-002548a3384e2694fac2c5d950888a8eea47f229.tar.gz
eclipse.platform.swt-002548a3384e2694fac2c5d950888a8eea47f229.tar.xz
eclipse.platform.swt-002548a3384e2694fac2c5d950888a8eea47f229.zip
Bug 466943 - Bogus UI freeze logged on Mac when opening a view menu
Change-Id: I045207e49db6d897cb40eb78ef9ae4f922a13a28 Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
index e51b2421c4..93e2e2cfcd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
@@ -274,8 +274,11 @@ void _setVisible (boolean visible) {
// Hold on to window in case it is disposed while the popup is open.
window.retain();
+ // NSMenu processes events on its own while the popup is open.
+ display.sendPreExternalEventDispatchEvent ();
NSEvent nsEvent = NSEvent.otherEventWithType(OS.NSApplicationDefined, location, 0, 0.0, window.windowNumber(), window.graphicsContext(), (short)0, 0, 0);
NSMenu.popUpContextMenu(nsMenu, nsEvent, shell.view);
+ display.sendPostExternalEventDispatchEvent ();
window.release();
} else {
nsMenu.cancelTracking ();

Back to the top