-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple monitors, window opens on wrong monitor #27
Comments
@adamdry This issue should have been fixed in the latest version 5.0.3 Please check and close this issue if solved. |
I am using altus, which uses 5.0.3. |
It keeps happening to me too. This is the configuration I have: import { app, BrowserWindow } from 'electron'
import windowStateKeeper from 'electron-window-state'
let mainWindow
function createWindow () {
/**
* Load the previous state with fallback to defaults
*/
let mainWindowState = windowStateKeeper({
defaultWidth: 1000,
defaultHeight: 600
})
/**
* Initial window options
*/
const { width, height, x, y } = mainWindowState
mainWindow = new BrowserWindow({
width,
height,
x,
y,
webPreferences: {
nodeIntegration: true
}
})
mainWindow.setMenu(null)
mainWindow.loadURL(process.env.APP_URL)
mainWindowState.manage(mainWindow)
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.on('ready', createWindow) |
Experiencing this issue |
You need to mention the .json file where to remember the values. mainWindowState = windowStateKeeper({ |
I did these steps:
I'm running Ubuntu 16.04, using node 7.9.0, Chrome 58.0.3029.110, and Electron 1.7.8
Edit:
Further testing shows that my app's window will maximise on which ever screen the terminal window I'm launching it from is on
The text was updated successfully, but these errors were encountered: