mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 18:32:34 +01:00
parent
8c687978d5
commit
77da0299f0
@ -130,4 +130,12 @@ electron.ipcMain.on('setAskBeforeClose', (e, val) => {
|
||||
askBeforeClose = val;
|
||||
});
|
||||
|
||||
module.exports = { configStore };
|
||||
function focusWindow() {
|
||||
try {
|
||||
if (mainWindow) mainWindow.webContents.focus();
|
||||
} catch (err) {
|
||||
console.error('Failed to focus window', err);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { focusWindow };
|
||||
|
@ -65,6 +65,7 @@ const { extname } = window.require('path');
|
||||
const { dialog, app } = electron.remote;
|
||||
|
||||
const configStore = electron.remote.require('./configStore');
|
||||
// const { focusWindow } = electron.remote.require('./electron');
|
||||
|
||||
const ReactSwal = withReactContent(Swal);
|
||||
|
||||
@ -1370,6 +1371,9 @@ const App = memo(() => {
|
||||
const { files } = ev.dataTransfer;
|
||||
const filePaths = Array.from(files).map(f => f.path);
|
||||
|
||||
// TODO https://github.com/electron/electron/issues/19920
|
||||
// focusWindow();
|
||||
|
||||
if (filePaths.length === 1 && filePaths[0].toLowerCase().endsWith('.csv')) {
|
||||
loadEdlFile(filePaths[0]);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user