Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
More changes to make sure R9 hopefully doesn't need a hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
torchgm committed Sep 22, 2020
1 parent a182041 commit 28f6dfe
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions ActiveDesktop/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public MainWindow()
FileSystem();



ImmersiveExperiencePage = new ImmersiveExperience();
ImmersiveFinalisePage = new ImmersiveFinalise();
CurrentAppsPage = new CurrentApps();
Expand Down Expand Up @@ -92,11 +93,20 @@ public MainWindow()
{
ErrorNotif.Visibility = Visibility.Visible;
}

JSONArrayList = ReadJSON();
// Trigger a refresh of many things. Not strictly necessary for all of this but hey extra refreshing is always nice
Displays = GetDisplays();
RefreshLists();
DebugRefreshEvent();
if (IsRunningAsUWP())
{
LogEntry("[ADP] Running in UWP mode");
}
else
{
LogEntry("[ADP] Running in legacy win32 mode");
}
if (JSONArrayList.Count != 0 && WindowHandles.Count() == 0)
{
StartSavedApps();
Expand All @@ -115,14 +125,7 @@ public MainWindow()
{
StartupInit();
}
if (IsRunningAsUWP())
{
LogEntry("[ADP] Running in UWP mode");
}
else
{
LogEntry("[ADP] Running in legacy win32 mode");
}


CurrentAppsPage.TitleTextBox.Text = "[Hold Ctrl to select an app]";
CurrentAppsPage.HwndInputTextBox.Text = "";
Expand Down Expand Up @@ -317,7 +320,10 @@ public void RefreshLists()
}
}
SavedListRefreshEvent();
StartupInit();
if (IsRunningAsUWP())
{
StartupInit();
}
LogEntry("[ADP] Refreshed in-app lists");
}

Expand Down Expand Up @@ -1110,8 +1116,16 @@ private static bool EnumWindow(IntPtr handle, IntPtr pointer)
// Checks if running as a UWP app
public bool IsRunningAsUWP()
{
Helpers helpers = new Helpers();
return helpers.IsRunningAsUwp();
try
{
Helpers helpers = new Helpers();
return helpers.IsRunningAsUwp();
}
catch (Exception)
{
return false;
}

}

// Actually removes the borders
Expand Down

0 comments on commit 28f6dfe

Please sign in to comment.