Repository navigation
Conversation
…electron#47764) * feat: save window state (electron#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <[email protected]> * 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 <[email protected]> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <[email protected]> * 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 <[email protected]> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <[email protected]> Co-authored-by: David Sanders <[email protected]> Co-authored-by: Erick Zhao <[email protected]> * 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 <[email protected]> Co-authored-by: David Sanders <[email protected]> Co-authored-by: Erick Zhao <[email protected]>
…ron#48941) * fix: handle tar.xz files in uploaders, add to breaking changes * docs: add additional file extension info
test: add view.getBounds|setBounds tests
…ctron#48973) Revert "fix: enable wasm trap handlers in all Node.js processes (electron#48788)" This reverts commit ca0b46b.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
e651117 to
905cf8b
Compare
ckerr
left a comment
There was a problem hiding this comment.
+13,877 −7,906
@nilayarya it feels like a wrong branch got selected here somewhere?
I don't think a 22K LOC diff is reviewable. Can you remove the extraneous commits?
@ckerr Sorry for the troubles. This will look right once |
No worries! I appreciate the PRs! |
|
@nilayarya are you planning to do any more work on this PR? |
|
This has a been a 22000 LOC diff for almost a year now without any cleanup work, so I'm going to close it. This isn't due to any opinion about the PR, just that it's been unreviewable for a year. If anyone wants to open a fixed version, feel free. |
Description of Change
Note
This PR is part of GSoC 2025 [project] [rfc]. It should be stacked on top of #47781 and #48048
Adds a new
restored-persisted-stateevent to BaseWindow that emits when window state restoration logic completes during initialization.The event only fires when
windowStatePersistenceis enabled, saved window state exists on disk, and valid display exists for window to be restored on.It uses
EmitEventSoonto ensure the event is delivered after the JavaScript object is fully constructed.Checklist
npm testpassesRelease Notes
Notes: Added
restored-persisted-stateevent to BaseWindow that emits when the persisted window state is restored.