Use async BrowserWindow::setDocumentEdited

This commit is contained in:
Kevin Sawicki
2014-08-13 17:44:15 -07:00
parent 770e97efff
commit 62924dfcd1
2 changed files with 6 additions and 2 deletions

View File

@@ -451,6 +451,7 @@ class Atom extends Model
center: ->
ipc.send('call-window-method', 'center')
# Schedule the window to be shown and focused on the next tick.
#
# This is done in a next tick to prevent a white flicker from occurring
@@ -470,6 +471,9 @@ class Atom extends Model
app.emit('will-exit')
remote.process.exit(status)
setDocumentEdited: (edited) ->
ipc.send('call-window-method', 'setDocumentEdited', edited)
# Public: Is the current window in development mode?
inDevMode: ->
@getLoadSettings().devMode

View File

@@ -232,8 +232,8 @@ class WorkspaceView extends View
# On OS X, fades the application window's proxy icon when the current file
# has been modified.
updateDocumentEdited: ->
modified = @getModel().getActivePaneItem()?.isModified?() ? false
atom.getCurrentWindow().setDocumentEdited modified
modified = @model.getActivePaneItem()?.isModified?() ? false
atom.setDocumentEdited(modified)
# Get all editor views.
#