File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
import '@/modules/electron-log/plugin'
2
+ import { ipcMain , ipcRenderer } from 'electron'
3
+
4
+ ipcMain ?. setMaxListeners ( Infinity )
5
+ ipcRenderer ?. setMaxListeners ( Infinity )
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
28
28
sandbox : false ,
29
29
} ,
30
30
} )
31
+ window . webContents . setMaxListeners ( Infinity )
31
32
window . setSize ( 1920 , 1080 )
32
33
window . webContents . setFrameRate ( 240 )
33
34
ipcMain . registerBrowserWindow ( name , window )
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
21
21
sandbox : false ,
22
22
} ,
23
23
} )
24
+ ipcMain . registerBrowserWindow ( name , window )
25
+ window . webContents . setMaxListeners ( Infinity )
24
26
25
27
{
26
28
const primaryDisplay = screen . getPrimaryDisplay ( )
@@ -37,8 +39,6 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
37
39
electronMessengerWindow . start ( window )
38
40
} )
39
41
40
- ipcMain . registerBrowserWindow ( name , window )
41
-
42
42
43
43
window . webContents . once ( 'did-finish-load' , ( ) => {
44
44
if ( import . meta. env . DEV ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
22
22
sandbox : false ,
23
23
} ,
24
24
} )
25
+ ipcMain . registerBrowserWindow ( name , window )
26
+ window . webContents . setMaxListeners ( Infinity )
25
27
26
28
{
27
29
const primaryDisplay = screen . getPrimaryDisplay ( )
@@ -38,7 +40,6 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
38
40
electronOverlayWindow . start ( window )
39
41
} )
40
42
41
- ipcMain . registerBrowserWindow ( name , window )
42
43
43
44
window . webContents . once ( 'did-finish-load' , ( ) => {
44
45
if ( import . meta. env . DEV ) {
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
29
29
sandbox : false ,
30
30
} ,
31
31
} )
32
+ ipcMain . registerBrowserWindow ( name , window )
33
+ window . webContents . setMaxListeners ( Infinity )
32
34
33
35
{
34
36
// https://github.com/electron/electron/issues/10078#issuecomment-331581160
@@ -43,8 +45,6 @@ const createWindow = async (name: string): Promise<BrowserWindow> => {
43
45
electronSpeechWorkerWindow . start ( window )
44
46
} )
45
47
46
- ipcMain . registerBrowserWindow ( name , window )
47
-
48
48
window . webContents . once ( 'did-finish-load' , ( ) => {
49
49
if ( import . meta. env . DEV ) {
50
50
window . webContents . openDevTools ( { mode : 'undocked' } )
You can’t perform that action at this time.
0 commit comments