Skip to content

A way for chrome.windows.create() to set normal position with minimized/maximized windows, used when the user restores the window #912

@tophf

Description

@tophf

Currently it's impossible and the documentation says:

state
The minimized, maximized and, fullscreen states cannot be combined with left, top, width, or height.

Adding a new property like normalPosition: {left, top, right, bottom} that can be specified in create() along with any non-normal state will provide a better user experience, automatically providing the preferred position and avoiding a very disruptive flicker if the user enables the extension to resize/move the window to the intended placement after the extension detected the change in window state.

Implementation

  • Windows has a dedicated SetWindowPlacement API for just that, which is already used in Chromium and Firefox.

  • Linux and others would probably need the browser to observe the window state change and apply the position explicitly (shouldn't introduce flicker due to minimal delays in native API usage unlike when the extension does it via IPC and potentially waking up the background script). Some desktop environments may already remember the preferred normal position automatically by identifying the windows by title or whatever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage: chromeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeneeds-triage: safariSafari needs to assess this issue for the first time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions