fix: isolate Electron dev instance
This commit is contained in:
@@ -44,6 +44,9 @@ const shouldStartInBackground = (loginItemSettings = readLoginItemSettings()) =>
|
||||
// Set the product name early so electron-log derives its log directory as
|
||||
// ~/Library/Logs/OpenChamber/ (not ~/Library/Logs/@openchamber/electron/).
|
||||
app.setName('OpenChamber');
|
||||
if (isDev) {
|
||||
app.setPath('userData', path.join(app.getPath('appData'), 'OpenChamber Dev'));
|
||||
}
|
||||
app.setAppUserModelId(APP_USER_MODEL_ID);
|
||||
app.commandLine.appendSwitch('proxy-bypass-list', '<-loopback>');
|
||||
|
||||
@@ -484,6 +487,7 @@ const writeWindowState = async (browserWindow) => {
|
||||
|
||||
const bounds = browserWindow.getBounds();
|
||||
await mutateSettingsRoot((root) => {
|
||||
if (!browserWindow || browserWindow.isDestroyed()) return root;
|
||||
root.desktopWindowState = {
|
||||
x: bounds.x,
|
||||
y: bounds.y,
|
||||
|
||||
Reference in New Issue
Block a user