* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: restore window state
* feat: flush display modes on show
* refactor: move utility functions to common area
* feat: clear window state
* fix: wait for the prefs to update
* test: clearWindowState extra test
* test: refine clear window state tests
* test: single monitor restore window tests
chore: rebase on gsoc-2025
* refactor: refine clearWindowState test
* fix: revert default_app back to original
* docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code
* fix: add correct permalink
* refactor: ci friendly
* fix: disable windowStatePersistence when no display
* refactor: use reference instead pointer
* fix: skip window state persistence for invalid/fake displays
* refactor: better flag placement
* test: add test to verify window state is not saved when no display
* fix: restore display mode inside show()
* feat: support for multimonitor tests
* fix: update yarn.lock file
* feat: support any resolution for new displays
* feat: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: clear sharedUserPath before and test
* refactor: hasInvalidDisplay function
* debug: add display info logging for CI
* fix: do not save/restore when window is 0x0
* test: support for multimonitor tests (#47911)
* test: support for multimonitor tests
* fix: update yarn.lock file
* test: support any resolution for new displays
* test: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* fix: native-addon forceCleanup
* docs: add forceCleanup description
* test: add two basic multi-monitor tests
* fix: find the closest display for non-overlapping saved bounds
* test: windowStatePersistence multi-monitor tests
* docs: add note on display APIs in CI
* fix: remove duplicate destroy registration
* feat: enforce unique window names across BaseWindow and BrowserWindow (#47764)
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: enforce unique window names across BaseWindow and BrowserWindow
* docs: update docs for name property
* fix: linter issue with symbol
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* docs: remove inaccurate comment
* fix: move expect blocks outside beforeEach
* test: exclude macOS-x64 for now
* test: remove invalid display test
* test: remove invalid display test
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: support for multimonitor tests (#47911)
* test: support for multimonitor tests
* fix: update yarn.lock file
* test: support any resolution for new displays
* test: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* feat: enforce unique window names across BaseWindow and BrowserWindow (#47764)
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: enforce unique window names across BaseWindow and BrowserWindow
* docs: update docs for name property
* fix: linter issue with symbol
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: clear and restore window state (#47781)
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: restore window state
* feat: flush display modes on show
* refactor: move utility functions to common area
* feat: clear window state
* fix: wait for the prefs to update
* test: clearWindowState extra test
* test: refine clear window state tests
* test: single monitor restore window tests
chore: rebase on gsoc-2025
* refactor: refine clearWindowState test
* fix: revert default_app back to original
* docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code
* fix: add correct permalink
* refactor: ci friendly
* fix: disable windowStatePersistence when no display
* refactor: use reference instead pointer
* fix: skip window state persistence for invalid/fake displays
* refactor: better flag placement
* test: add test to verify window state is not saved when no display
* fix: restore display mode inside show()
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: clear sharedUserPath before and test
* refactor: hasInvalidDisplay function
* debug: add display info logging for CI
* fix: do not save/restore when window is 0x0
* test: support for multimonitor tests (#47911)
* test: support for multimonitor tests
* fix: update yarn.lock file
* test: support any resolution for new displays
* test: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* feat: enforce unique window names across BaseWindow and BrowserWindow (#47764)
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: enforce unique window names across BaseWindow and BrowserWindow
* docs: update docs for name property
* fix: linter issue with symbol
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: remove invalid display test
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: restore window state
* feat: flush display modes on show
* refactor: move utility functions to common area
* feat: clear window state
* fix: wait for the prefs to update
* test: clearWindowState extra test
* test: refine clear window state tests
* test: single monitor restore window tests
chore: rebase on gsoc-2025
* refactor: refine clearWindowState test
* fix: revert default_app back to original
* docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code
* fix: add correct permalink
* refactor: ci friendly
* fix: disable windowStatePersistence when no display
* refactor: use reference instead pointer
* fix: skip window state persistence for invalid/fake displays
* refactor: better flag placement
* test: add test to verify window state is not saved when no display
* fix: restore display mode inside show()
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: clear sharedUserPath before and test
* refactor: hasInvalidDisplay function
* debug: add display info logging for CI
* fix: do not save/restore when window is 0x0
* test: support for multimonitor tests (#47911)
* test: support for multimonitor tests
* fix: update yarn.lock file
* test: support any resolution for new displays
* test: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* feat: enforce unique window names across BaseWindow and BrowserWindow (#47764)
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: enforce unique window names across BaseWindow and BrowserWindow
* docs: update docs for name property
* fix: linter issue with symbol
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: remove invalid display test
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
* feat: save window state (#47425)
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* feat: enforce unique window names across BaseWindow and BrowserWindow
* docs: update docs for name property
* fix: linter issue with symbol
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* test: support for multimonitor tests
* fix: update yarn.lock file
* test: support any resolution for new displays
* test: support display positioning
* docs: multi-monitor tests
* test: remove dummy test
* feat: save/restore window state
* cleanup
* remove constructor option
* refactor: apply suggestions from code review
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: forward declare prefservice
* refactor: remove constructor option
* refactor: save window state on move/resize instead of moved/resized
* feat: resave window state after construction
* test: add basic window save tests
* test: add work area tests
* test: asynchronous batching behavior
* docs: add windowStateRestoreOptions to BaseWindowConstructorOptions
* chore: move includes to main block
* Update spec/api-browser-window-spec.ts
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* docs: update docs/api/structures/base-window-options.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: preserve original bounds during window state save in special modes
* feat: save kiosk state in window preferences
* chore: remove ts-expect-error
* test: check hasCapturableScreen before running tests
* test: remove multimonitor tests
* test: add missing hasCapturableScreen checks before tests
* docs: add blurb on saving mechanism
* feat: add debounce window of 200ms to saveWindowState
* docs: remove blurb until finalized
* style: convert constants from snake_case to camelCase
* refactor: initialize prefs_ only if window state is configured to be saved/restored
* refactor: rename window states key
* refactor: store in application-level Local State instead of browser context
* refactor: switch to more accurate function names
* fix: add dcheck for browser_process
* fix: flush window state to avoid race condition
* refactor: change stateId to name
* refactor: change windowStateRestoreOptions to windowStatePersistence
* Update docs/api/structures/base-window-options.md
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* fix: add warning when window state persistence enabled without window name
* docs: lowercase capital B for consistency
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* fix: Optimize the value of memory.free in the return data of getSystemMemoryInfo().
* fix: Improve the value of memory in the return data of getSystemMemoryInfo().
* fix: complete API doc.
* Update docs/api/process.md
Co-authored-by: Will Anderson <will@itsananderson.com>
* fix: update name to fileBacked.
* fix: fix with code conflict
---------
Co-authored-by: Will Anderson <will@itsananderson.com>
* feat: Use DIR_ASSETS path to locate resource bundles
* Use DIR_ASSETS for calculating ASAR relative paths
* Add test to verify 'assets' matches parent dir of 'exe'
* Add Mac-specific test for assets path (but it is failing)
* test: Update app.getPath('assets') to expect an exception on Mac
* docs: Update docs for 'assets' path to indicate that it's only available on Windows + Linux
* fix: Don't define 'assets' mapping on macOS
* feat: add setAccentColor on Windows
* refactor: unify GetSystemAccentColor
* refactor: remove redundant parsing
* chore: fixup documentation
* Update docs/api/browser-window.md
Co-authored-by: Will Anderson <andersonw@dropbox.com>
* Update docs/api/base-window.md
Co-authored-by: Will Anderson <andersonw@dropbox.com>
---------
Co-authored-by: Will Anderson <andersonw@dropbox.com>
* feat: webFrameMain.fromFrameToken
* refactor: return null instead of undefined
* docs: mention renderer webFrame property
* chore: undo null->undefined in wfm.fromId api
this will be updated in another pr
* refactor: add a v8::Isolate* arg to RendererClientBase::IsWebViewFrame()
Needed for creating gin dictionaries
refactor: add a v8::Isolate* arg to ShouldLoadPreload()
Needed for calling IsWebViewFrame()
* refactor: add a v8::Isolate* arg to electron::util::CompileAndCall()
* refactor: add a v8::Isolate* arg to OnCreatePreloadableV8Context()
* refactor: add a v8::Isolate* arg to InvokeEmitProcessEvent()
* refactor: add a v8::Isolate* arg to ServiceWorkerData's constructor
* refactor: add a v8::Isolate* arg to RendererClientBase::SetupMainWorldOverrides()
* refactor: add a v8::Isolate* arg to RendererClientBase::WilLReleaseScriptContext()
* docs: update docs to avoid v8::Context::GetIsolate()
* refactor: add a v8::Isolate* arg to ElectronSandboxedRendererClient::InitializeBindings()
* refactor: avoid v8::Context::GetIsolate() call in PromiseBase::SettleScope::~SettleScope()
fix: window.open popups are always resizable
Closes https://github.com/electron/electron/issues/43591.
Per current WHATWG spec, the `window.open` API should always
create a resizable popup window. This change updates the
`parseFeaturesString` function to ensure that windows opened
with `window.open` are always resizable, regardless of the
`resizable` feature string.