Commit Graph

57 Commits

Author SHA1 Message Date
Antonio Scandurra
727472af58 Disable zoom in the main process
This commit will register the `display-added` and `display-removed`
events only once in the main process in order to disable zoom (see
https://github.com/atom/atom/pull/11345) directly instead of
unnecessarily paying for I/O in the renderer process during startup.
2017-03-07 10:54:42 +01:00
simurai
ec9aec6686 Merge branch 'master' into sm-custom-title-bar 2017-02-21 21:56:53 +09:00
Nathan Sobo
c6cae5b8fd Store represented directory paths directly on AtomWindow in main process
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.
2017-02-07 13:15:27 -07:00
simurai
c406cc4420 Merge branch 'master' into sm-hidden-all 2017-01-14 10:09:07 +09:00
Vladimir Timofeev
a21841e5f3 Merge commit '1320ff28c39afd563820b30b43389ea38552e74c' into fix-12495 2017-01-07 01:19:50 +03:00
Damien Guard
5a446ff467 Clean up portable mode, try local .atom before ATOM_HOME 2016-12-11 15:59:24 -08:00
Joe Fitzgerald
1b2d2f0299 Use child_process.spawn instead of execFile
- Fixes #13084
- Kill child process on process exit, if it is running
- Ensure env is set correctly when new windows are launched
2016-11-14 10:06:26 -07:00
Damien Guard
0d0a2ae7b1 Windows 64-bit version of Atom 2016-11-10 16:59:12 -08:00
Lee Dohm
505160f24c Remove --harmony JavaScript flag 2016-10-27 11:50:08 -07:00
Damien Guard
8229924b96 History API, reopen project menu, command and list view 2016-10-21 15:13:59 -07:00
simurai
f05f0db94b Migrate config 2016-10-21 13:58:24 +09:00
simurai
f13fd74342 🎨 Resolve merge conflict 2016-10-15 20:53:02 +09:00
simurai
2571bbc6f2 Merge branch 'master' into sm-hidden-inset
# Conflicts:
#	src/main-process/atom-application.coffee
2016-10-15 19:45:50 +09:00
simurai
ed2c72a586 Add option to hide the title bar 2016-10-15 19:12:53 +09:00
Antonio Scandurra
a36e9883d8 🎨 2016-10-14 13:07:03 +02:00
Antonio Scandurra
5211b49f7d Add a "Run Benchmarks" command to plot benchmark results 2016-10-14 11:02:59 +02:00
Antonio Scandurra
1bdd79d719 Implement atom --benchmark-test to ensure benchmarks are valid on CI 2016-10-14 11:02:59 +02:00
Antonio Scandurra
fa90851e14 Implement atom --benchmark 2016-10-14 11:02:58 +02:00
Wliu
0e99232615 Merge pull request #12782 from Ingramz/remove-unused-variables-obvious
Remove unused variables (obvious ones)
2016-09-29 16:58:06 -04:00
Damien Guard
2cf2dcca57 Allow Atom on Windows to run multiple instances e.g. on Windows server/Citrix etc 2016-09-29 09:55:34 -07:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Nathan Sobo
f14587d3cc Use app activate event instead of defunct activate-with-no-open-windows
This restores the ability to open a Window by single-clicking the dock
icon on macOS.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-22 15:54:44 -06:00
Nathan Sobo
19a4f1ab89 Null guard AtomWindow instance in window-method ipc handler
Since things are async, I think the window could potentially disappear
before we can handle the message.
2016-09-22 14:14:37 -06:00
Nathan Sobo
3a4ae04f74 Use call/respondTo helpers to return a promise from window method ipcs
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-22 12:18:09 -06:00
Nathan Sobo
50128949d4 Call window methods on AtomWindow when ipc'ing from render process
This enables saveState to be called when requesting a window reload from the render process.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-22 11:41:57 -06:00
Nathan Sobo
9ace7b899c Bind promptForRestart since it calls a method now
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-22 11:29:39 -06:00
Nathan Sobo
7872875c57 🎨 2016-09-20 15:15:55 -06:00
Nathan Sobo
fe9a7d1db3 Preserve command line flags when restarting
This performs restarts in the main process and uses ipc to request restarts from application windows. We preserve the following settings:

* dev mode
* custom resource path
* safe mode
* portable mode
* socket path
* log file path
* user data dir
2016-09-20 15:13:46 -06:00
Nathan Sobo
1d740b4169 Relaunch Atom when changing the title bar style
Now that we have the required API

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-20 11:39:58 -06:00
Antonio Scandurra
e2a3b75db2 Fix app not quitting on win32 and linux when closing the last window
This regression was caused by a nuance in the way we maintain state in
`AtomApplication` for open windows. Specifically, when closing the last
window on Windows and Linux, we were explicitly calling `app.quit`
*before* removing such window from the list of open ones. In turn, this
caused the new `before-quit` behavior introduced in #12619 to work
improperly because it made the application wait on saving the state of a
stale window before exiting.

With this commit we are fixing that by making sure the stale window is
removed before calling `app.quit` in `removeWindow`.
2016-09-09 10:51:40 +02:00
Antonio Scandurra
0f6eadcfce Wait for windows' state to be saved before closing the app or any window
Previously, we used to save the window's state in the renderer process
`beforeunload` event handler: because of the synchronous nature of event
handlers and the asynchronous design of IndexedDB, this could
potentially not save anything if windows close fast enough to prevent
IndexedDB from committing the pending transaction containing the state.
(Ref.: https://mzl.la/2bXCXDn)

With this commit, we will intercept the `before-quit` events on
`electron.app` and the `close` event on `BrowserWindow` (which will fire
respectively before quitting the application and before closing a
window), and prevent them from performing the default action. We will
then ask each renderer process to save its state and, finally, close the
window and/or the app.
2016-09-07 13:03:33 +02:00
Alan
71ee729f84 Change Help->Documentation url from https to http (Fix #12583)
The flight manual page does not have a secure connection, so navigating
to the https link would result in a SSL_ERROR_BAD_CERT_DOMAIN error.

It might be better to add a secure connection to the server rather than
pulling this commit.
2016-09-01 14:14:17 -07:00
yuanwhy
1c1640c1d8 rename to did-change-paths 2016-08-30 20:29:05 +08:00
yuanwhy
4e0da56296 send event to save state after 'Add Project Folder' or 'Remove Project Folder 2016-08-29 22:52:26 +08:00
Nathan Sobo
b3009f1387 Focus application on all code paths that open windows in main process
I think this should take the application out of “app nap” on macOS,
leading to better responsiveness when opening paths from the CLI.
2016-08-28 06:17:41 -06:00
Damien Guard
d47fd28c86 Focus new window when existing copy of Atom running fixes #4324 2016-08-12 17:45:24 -07:00
Antonio Scandurra
753db274fc Clear storage data after each AtomApplication test
This, along with using a temporary directory as the ATOM_HOME, will make
sure that tests won't share any state with one another, possibly
increasing the level of resiliency of the suite.
2016-08-12 15:20:58 +02:00
Antonio Scandurra
c422699c80 Call @config.load() in AtomApplication constructor
This is needed in order to test configuration settings like
`restorePreviousWindowsOnStart`. Even if this call has side effects, its
scope is pretty constrained because it affects only the temporary
directory we create before each atom-application test.
2016-08-12 11:21:37 +02:00
Antonio Scandurra
f287e8783f Return an AtomWindow array in loadState or null if no state is found 2016-08-12 10:49:46 +02:00
Antonio Scandurra
fff2ecd162 Extract a AtomApplication.prototype.launch method
...so that we can exercise loading previously opened windows stored
state after the application is restarted. In addition, this resembles
more what we run in production, and therefore allows us to have a better
coverage of the code paths we run in the real application.
2016-08-12 10:44:09 +02:00
Nathan Sobo
f1295d39a8 Close all windows in AtomApplication.destroy 2016-08-11 14:31:36 -06:00
Nathan Sobo
502339b830 Replace chromedriver test of window offset with main process mocha test
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 10:33:12 -06:00
Nathan Sobo
d8b2a1f4b6 Break out constructor side effects into AtomApplication.initialize
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 08:15:00 -06:00
Philipp Brumm
6370db9d99 change dialog wording 2016-07-02 12:40:18 +02:00
Philipp Brumm
faa1f935f8 make custom titlebar user-configurable and prompt for relaunch on change 2016-07-02 12:28:14 +02:00
Damien Guard
511587c3d0 Merge pull request #11929 from atom/windows-multiple-versions
Allow different versions of Atom to run simultaneously on Win32
2016-06-23 10:59:19 -07:00
Leonard Lamprecht
3a1ad3fd40 Replace OS X and Mac OS with macOS 2016-06-18 15:33:08 +02:00
Lee Dohm
c7e3b0c728 📝 Update old docs links to point to Flight Manual 2016-06-15 08:57:27 -07:00
Damien Guard
f0a5d679ac Allow multiple different versions of Atom to run simultaneously on Windows 2016-06-07 16:49:59 -07:00
Antonio Scandurra
5e0e65b2e0 Merge branch 'master' into as-file-recovery-service 2016-05-26 12:01:50 +02:00