@@ -18,6 +18,7 @@ import Positoner from 'electron-positioner';
18
18
import { ElectronBlocker } from '@cliqz/adblocker-electron' ;
19
19
import fetch from 'cross-fetch' ;
20
20
21
+ let positioner ;
21
22
22
23
export default class AppUpdater {
23
24
constructor ( ) {
@@ -87,7 +88,7 @@ const createWindow = async () => {
87
88
icon : getAssetPath ( 'icon.png' ) ,
88
89
webPreferences : {
89
90
webviewTag :true ,
90
-
91
+ nodeIntegration : false ,
91
92
preload : app . isPackaged
92
93
? path . join ( __dirname , 'preload.js' )
93
94
: path . join ( __dirname , '../../.erb/dll/preload.js' ) ,
@@ -99,8 +100,8 @@ const createWindow = async () => {
99
100
blocker . enableBlockingInSession ( mainWindow ?. webContents . session ) ;
100
101
} )
101
102
102
- var positioner = new Positoner ( mainWindow ) ;
103
- positioner . move ( 'topRight' )
103
+ positioner = new Positoner ( mainWindow ) ;
104
+ positioner . move ( 'topRight' ) ;
104
105
mainWindow . loadURL ( resolveHtmlPath ( 'index.html' ) ) ;
105
106
106
107
mainWindow . on ( 'ready-to-show' , ( ) => {
@@ -128,7 +129,6 @@ const createWindow = async () => {
128
129
} ) ;
129
130
130
131
// Remove this if your app does not use auto updates
131
- // eslint-disable-next-line
132
132
new AppUpdater ( ) ;
133
133
} ;
134
134
155
155
} ) ;
156
156
} )
157
157
. catch ( console . log ) ;
158
+
159
+ ipcMain . on ( 'window-move' , ( args ) => {
160
+ positioner . move ( args ) ;
161
+ } )
0 commit comments