Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriain holmes <iain@xamarin.com>2019-06-26 17:13:32 +0300
committeriain holmes <iain@xamarin.com>2019-06-26 17:13:32 +0300
commit5a4f121d44f5cfb6dee37359a44e586f7005bbcd (patch)
treeb03c502c6910f764241b86929143fda15a2713eb /main/src/addins/MacPlatform/MacPlatform.cs
parent0051728f370db257af9eb66561a12fd0dd80f739 (diff)
[IDE] Improve the LaunchType detection
Diffstat (limited to 'main/src/addins/MacPlatform/MacPlatform.cs')
-rw-r--r--main/src/addins/MacPlatform/MacPlatform.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/addins/MacPlatform/MacPlatform.cs b/main/src/addins/MacPlatform/MacPlatform.cs
index 259ae73bb7..670bedb456 100644
--- a/main/src/addins/MacPlatform/MacPlatform.cs
+++ b/main/src/addins/MacPlatform/MacPlatform.cs
@@ -343,6 +343,15 @@ namespace MonoDevelop.MacIntegration
if (MacSystemInformation.OsVersion >= MacSystemInformation.Sierra)
NSWindow.AllowsAutomaticWindowTabbing = false;
+
+ // At this point, Cocoa should have been initialized; it is initialized along with Gtk+ at the beginning of IdeStartup.Run
+ // If LaunchReason is still Unknown at this point, it means we have missed the NSApplicationDidLaunch notification for some reason and
+ // we fall back to it being a Normal startup to unblock anything waiting for that notification.
+ if (IdeApp.LaunchReason == IdeApp.LaunchType.Unknown) {
+ LoggingService.LogWarning ("Missed NSApplicationDidLaunch notification, assuming normal startup");
+ IdeApp.LaunchReason = IdeApp.LaunchType.Normal;
+ }
+
return loaded;
}