mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	electron: Fix crash on Linux
This commit is contained in:
		@@ -46,16 +46,18 @@ ipcMain.on('create-extra-window', (event, arg) => {
 | 
				
			|||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function createMainWindow(app: App) {
 | 
					async function createMainWindow(app: App) {
 | 
				
			||||||
    app.setUserTasks([
 | 
					    if ("setUserTasks" in app) {
 | 
				
			||||||
        {
 | 
					        app.setUserTasks([
 | 
				
			||||||
            program: process.execPath,
 | 
					            {
 | 
				
			||||||
            arguments: '--new-window',
 | 
					                program: process.execPath,
 | 
				
			||||||
            iconPath: process.execPath,
 | 
					                arguments: '--new-window',
 | 
				
			||||||
            iconIndex: 0,
 | 
					                iconPath: process.execPath,
 | 
				
			||||||
            title: 'Open New Window',
 | 
					                iconIndex: 0,
 | 
				
			||||||
            description: 'Open new window'
 | 
					                title: 'Open New Window',
 | 
				
			||||||
        }
 | 
					                description: 'Open new window'
 | 
				
			||||||
    ]);
 | 
					            }
 | 
				
			||||||
 | 
					        ]);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    const windowStateKeeper = (await import('electron-window-state')).default; // should not be statically imported
 | 
					    const windowStateKeeper = (await import('electron-window-state')).default; // should not be statically imported
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user