Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix maximized/full screen state on launch; this regressed with 6d72210
Browse files Browse the repository at this point in the history
Fixes #7664

I did not see the `ready-to-show` handler firing on Windows. This change works great on Windows and macOS (I manually tested both)

Auditors: @bridiver, @bbondy
  • Loading branch information
bsclifton committed Mar 20, 2017
1 parent bee2993 commit bf63d55
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/stores/appStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ const createWindow = (action) => {
})
}

if (windowState.ui && windowState.ui.isMaximized) {
mainWindow.maximize()
}

if (windowState.ui && windowState.ui.isFullScreen) {
mainWindow.setFullScreen(true)
}

mainWindow.webContents.on('did-finish-load', (e) => {
lastEmittedState = appState
e.sender.send(messages.INITIALIZE_WINDOW, frameOpts.disposition, appState.toJS(), frames, action.restoredState)
Expand All @@ -218,14 +226,6 @@ const createWindow = (action) => {

mainWindow.on('ready-to-show', () => {
mainWindow.show()

if (windowState.ui && windowState.ui.isMaximized) {
mainWindow.maximize()
}

if (windowState.ui && windowState.ui.isFullScreen) {
mainWindow.setFullScreen(true)
}
})

mainWindow.loadURL(appUrlUtil.getBraveExtIndexHTML())
Expand Down

0 comments on commit bf63d55

Please sign in to comment.