diff options
author | Sergey Prigogin | 2015-05-12 13:38:44 +0000 |
---|---|---|
committer | Arun Thondapu | 2015-05-12 16:51:47 +0000 |
commit | 002548a3384e2694fac2c5d950888a8eea47f229 (patch) | |
tree | c2b17d7a0581548fe33f458ef19f1c94ffd27fef | |
parent | e84feaec9ce7b27fc38c8ff6438796d4fd8839e7 (diff) | |
download | eclipse.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.java | 3 |
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 (); |