Skip to content

Commit

Permalink
retain show hidden behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy-s committed Feb 17, 2025
1 parent e462a1b commit cc0e006
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SystemInformer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <phsvc.h>
#include <procprv.h>
#include <devprv.h>
#include <notifico.h>

#include <ksisup.h>
#include <settings.h>
Expand Down Expand Up @@ -1248,6 +1249,15 @@ VOID PhpInitializeSettings(
{
PhSetIntegerSetting(L"ReleaseChannel", PhStartupParameters.UpdateChannel);
}

if (PhStartupParameters.ShowHidden && !PhNfIconsEnabled())
{
// HACK(jxy-s) The default used to be that system tray icons where enabled, this keeps the
// old behavior for automation workflows. If the user specified "-hide" then they want to
// start the program hidden to the system tray and not show any main window. If there are no
// system tray icons enabled then we need to enable them so the behavior is consistent.
PhSetStringSetting(L"IconSettings", L"2|1");
}
}

typedef enum _PH_COMMAND_ARG
Expand Down

0 comments on commit cc0e006

Please sign in to comment.