-
Notifications
You must be signed in to change notification settings - Fork 74
Description
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.