mirror of https://github.com/keeweb/keeweb.git
fixed window activation when KeeWeb is launched second time
This commit is contained in:
parent
bd9144628f
commit
d9860935c1
|
@ -1,8 +1,9 @@
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const app = electron.app;
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const app = electron.app;
|
||||||
|
|
||||||
let mainWindow = null;
|
let mainWindow = null;
|
||||||
let appIcon = null;
|
let appIcon = null;
|
||||||
let ready = false;
|
let ready = false;
|
||||||
|
@ -42,6 +43,7 @@ app.on('window-all-closed', () => {
|
||||||
app.removeAllListeners('ready');
|
app.removeAllListeners('ready');
|
||||||
app.removeAllListeners('open-file');
|
app.removeAllListeners('open-file');
|
||||||
app.removeAllListeners('activate');
|
app.removeAllListeners('activate');
|
||||||
|
app.removeAllListeners('single-instance');
|
||||||
electron.globalShortcut.unregisterAll();
|
electron.globalShortcut.unregisterAll();
|
||||||
electron.powerMonitor.removeAllListeners('suspend');
|
electron.powerMonitor.removeAllListeners('suspend');
|
||||||
electron.powerMonitor.removeAllListeners('resume');
|
electron.powerMonitor.removeAllListeners('resume');
|
||||||
|
@ -83,6 +85,11 @@ app.on('activate', () => {
|
||||||
app.on('will-quit', () => {
|
app.on('will-quit', () => {
|
||||||
electron.globalShortcut.unregisterAll();
|
electron.globalShortcut.unregisterAll();
|
||||||
});
|
});
|
||||||
|
app.on('second-instance', () => {
|
||||||
|
if (mainWindow) {
|
||||||
|
restoreMainWindow();
|
||||||
|
}
|
||||||
|
});
|
||||||
app.restartApp = function () {
|
app.restartApp = function () {
|
||||||
restartPending = true;
|
restartPending = true;
|
||||||
mainWindow.close();
|
mainWindow.close();
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
Release notes
|
Release notes
|
||||||
-------------
|
-------------
|
||||||
|
##### v1.7.3 (TBD)
|
||||||
|
`-` fixed window activation when KeeWeb is launched second time
|
||||||
|
|
||||||
##### v1.7.2 (2019-01-07)
|
##### v1.7.2 (2019-01-07)
|
||||||
`-` fixed Google Drive cookies issues
|
`-` fixed Google Drive cookies issues
|
||||||
`-` fixed storage providers authentication
|
`-` fixed storage providers authentication
|
||||||
|
|
Loading…
Reference in New Issue