Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Start-Process -WindowStyle Minimized steals focus #7790

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.