You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's fair to assume that you typically do not want the newly created, minimized window to steal focus from the calling application when you use Start-Process -WindowStyle Minimized.
That is, the calling application (console window) should remain the active application and continue to receive keyboard output.
Currently, -WindowStyle Minimized invariably focuses the minimized window - while the calling window is by definition not obscured, it loses keyboard focus that way.
Two possible enhancements:
Change -WindowStyle Minimized to not steal focus.
Since that is technically a breaking change - someone may rely on the old behavior, though I have trouble picturing why - alternatively introduce a new style, MinimizedNoFocus similar to Visual Basic's [AppWinStyle] enumeration.
Conceivably, NormalNoFocus could be implemented too (that is, start a process with normal window size, but without giving it focus).
Update:
A related, but distinct issue is #3028, which concern's the CLI's (the pwsh executable's) -WindowStyle parameter, notably the ability to start PowerShell as a whole hidden.
It's fair to assume that you typically do not want the newly created, minimized window to steal focus from the calling application when you use
Start-Process -WindowStyle Minimized.That is, the calling application (console window) should remain the active application and continue to receive keyboard output.
Currently,
-WindowStyle Minimizedinvariably focuses the minimized window - while the calling window is by definition not obscured, it loses keyboard focus that way.Two possible enhancements:
Change
-WindowStyle Minimizedto not steal focus.Since that is technically a breaking change - someone may rely on the old behavior, though I have trouble picturing why - alternatively introduce a new style,
MinimizedNoFocussimilar to Visual Basic's[AppWinStyle]enumeration.NormalNoFocuscould be implemented too (that is, start a process with normal window size, but without giving it focus).Update:
A related, but distinct issue is #3028, which concern's the CLI's (the
pwshexecutable's)-WindowStyleparameter, notably the ability to start PowerShell as a whole hidden.Environment data
Written as of: