Bug 358376 - Provide ability to handle reopen-events (user clicks dock icon for running application)
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 230fc2b..c8b8c7c 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
@@ -5274,7 +5274,9 @@
 		}
 		new NSApplication(arg0).replyToOpenOrPrint(OS.NSApplicationDelegateReplySuccess);
 	}  else if (sel == OS.sel_applicationShouldHandleReopen_hasVisibleWindows_) {
-		return 1;
+		final Event event = new Event();
+		display.sendEvent(SWT.Activate, event);
+		return event.doit ? 1 : 0;
 	}
 	return 0;
 }