8000 Start-Process -WindowStyle Minimized steals focus · Issue #7790 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Start-Process -WindowStyle Minimized steals focus #7790
Closed
@mklement0

Description

@mklement0

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.

Environment data

Written as of:

PowerShell Core 6.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or more

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0