2017-02-14 02:11:37 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title></title>
|
|
|
|
<script>
|
|
|
|
const {ipcRenderer, remote} = require('electron')
|
|
|
|
|
2017-02-14 02:22:57 +00:00
|
|
|
remote.getCurrentWindow().focus()
|
2017-02-14 02:11:37 +00:00
|
|
|
|
2017-02-14 02:22:57 +00:00
|
|
|
const child = new remote.BrowserWindow({show: false})
|
|
|
|
child.loadURL('about:blank')
|
2017-02-14 02:11:37 +00:00
|
|
|
child.webContents.focus()
|
2017-02-14 02:22:57 +00:00
|
|
|
|
|
|
|
const currentFocused = remote.getCurrentWindow().isFocused()
|
|
|
|
const childFocused = child.isFocused()
|
|
|
|
child.close()
|
|
|
|
ipcRenderer.send('answer', currentFocused, childFocused)
|
2017-02-14 02:11:37 +00:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|