Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Comments

Store represented directory paths directly on AtomWindow in main process#13768

Merged
nathansobo merged 1 commit intomasterfrom
ns-mb-fix-window-restoration
Feb 7, 2017
Merged

Store represented directory paths directly on AtomWindow in main process#13768
nathansobo merged 1 commit intomasterfrom
ns-mb-fix-window-restoration

Conversation

@nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Feb 7, 2017

Fixes #13761

Previously, when adding a window, we were unable to read its current project paths out of the hash of the URL during window initialization because the window still considered itself to be loading. Rather than fixing this issue, we decided to completely eliminate the sharing of state between processes in the window.location and instead switch to cached synchronous RPC for the loadSettings and a dedicated RPC-based mechanism for the project paths.

🍐 'd with @maxbrunsfeld

Fixes #13729

Previously, when adding a window, we were unable to read its current
project paths out of the hash of the URL during window initialization
because the window still considered itself to be loading. Rather than
fixing this issue, we decided to completely eliminate the sharing of
state between processes in the window.location and instead switch to
cached synchronous RPC for the loadSettings and a dedicated RPC-based
mechanism for the project paths.
@ungb
Copy link
Contributor

ungb commented Feb 7, 2017

taking a 👀

@ungb
Copy link
Contributor

ungb commented Feb 7, 2017

atom --version
Atom    : 1.15.0-dev-c6cae5b
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0


I am still able to repro the issue in #13729.
testd

@nathansobo
Copy link
Contributor Author

@ungb strange. I checked again and this is working. It seems like the steps pictured in your animation are somewhat different than the original reproduction steps for the issue. I wonder if there's another issue involved. Here's what works for me:

  • Open a directory in Atom atom .
  • Atom opens a window for that directory. Close that window, then quit Atom.
  • cat ~/.atom/storage/application.json shows an empty array. This is the evil state from before.
  • Open a directory in Atom again atom .
  • Quit without closing any windows first.
  • cat ~/.atom/storage/application.json shows an array with a window for the opened path. This is the desired state that wasn't showing up previously when quitting Atom before blurring the window.
  • Open Atom with no path atom. This restores the previous window state as expected.

@nathansobo
Copy link
Contributor Author

Sorry, I had associated this PR with the wrong issue out of confusion. I should have referenced fixing #13761. I've updated the PR body accordingly.

@nathansobo nathansobo merged commit d08a62c into master Feb 7, 2017
@nathansobo nathansobo deleted the ns-mb-fix-window-restoration branch February 7, 2017 21:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Previously open session isn't being saved when opening atom from spotlight

2 participants