Skip to content

Commit ef20dc0

Browse files
committed
fix new project from explorer context menu (main window was visible behind new project window)
1 parent f1bb731 commit ef20dc0

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

UnityLauncherPro/MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:System="clr-namespace:System;assembly=mscorlib"
88
xmlns:converters="clr-namespace:UnityLauncherPro.Converters" x:Class="UnityLauncherPro.MainWindow"
99
mc:Ignorable="d"
10-
Title="UnityLauncherPro" Height="650" Width="880" WindowStartupLocation="CenterScreen" Background="{DynamicResource ThemeDarkestBackground}" MinWidth="600" MinHeight="650" AllowsTransparency="True" WindowStyle="None" Margin="0" KeyDown="OnWindowKeyDown" Closing="Window_Closing" SizeChanged="Window_SizeChanged" Icon="Images/icon.ico" Activated="Window_Activated" Loaded="Window_Loaded">
10+
Title="UnityLauncherPro" Height="650" Width="880" WindowStartupLocation="CenterScreen" Background="{DynamicResource ThemeDarkestBackground}" MinWidth="600" MinHeight="650" AllowsTransparency="True" WindowStyle="None" Margin="0" KeyDown="OnWindowKeyDown" Closing="Window_Closing" SizeChanged="Window_SizeChanged" Icon="Images/icon.ico" SourceInitialized="Window_SourceInitialized">
1111
<Window.Resources>
1212

1313
<converters:LastModifiedConverter x:Key="lastModifiedConverter"/>

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,12 +1540,6 @@ private void MenuItemSetPreferredUnityVersion_Click(object sender, RoutedEventAr
15401540

15411541
}
15421542

1543-
private void Window_Activated(object sender, EventArgs e)
1544-
{
1545-
//Console.WriteLine("gridRecent.IsFocused=" + gridRecent.IsFocused);
1546-
//Console.WriteLine("gridRecent.IsFocused=" + gridRecent.IsKeyboardFocused);
1547-
}
1548-
15491543
private void MenuItemCopyPath_Click(object sender, RoutedEventArgs e)
15501544
{
15511545
string copy = null;
@@ -2405,8 +2399,9 @@ private void MenuItemDownloadWebGLModule_Click(object sender, RoutedEventArgs e)
24052399
Tools.DownloadAdditionalModules(unity.Path, unity.Version, "WebGL");
24062400
}
24072401

2408-
private void Window_Loaded(object sender, RoutedEventArgs e)
2402+
private void Window_SourceInitialized(object sender, EventArgs e)
24092403
{
2404+
// need to run here, so that main window gets hidden if start from commandline as new/upgrade project
24102405
Start();
24112406
}
24122407

0 commit comments

Comments
 (0)