|| 900, x: initData.x, y: initData.y, maximized: initData.maximized }); win.on('move', trackWindow); win.on('resize', trackWindow); function trackWindow () { if (win.isMaximized()) { ... } else { windowBox = win.getBounds(); } if (!syncTimer) { syncTimer = setTimeout(saveWindowState, 500); } } Tracking The BrowserWindow • Create the BrowserWindow using saved size information (no flicker) • Track move and resize events at the level of the BrowserWindow. • Buffer changes (they fire quickly)