|
|
@@ -1,6 +1,7 @@
|
|
|
const { app, BrowserWindow, Menu, ipcMain, globalShortcut, dialog, screen, Tray } = require('electron');
|
|
|
const { join } = require('path');
|
|
|
const { fork } = require('child_process');
|
|
|
+const { platform } = require('process');
|
|
|
|
|
|
class MainSerivce {
|
|
|
constructor() {
|
|
|
@@ -87,7 +88,7 @@ class MainSerivce {
|
|
|
})
|
|
|
|
|
|
// 禁用右键
|
|
|
- this.mainWin.hookWindowMessage(278, () => {
|
|
|
+ if(platform === 'win32') this.mainWin.hookWindowMessage(278, () => {
|
|
|
this.mainWin.setEnabled(false);//窗口禁用
|
|
|
setTimeout(() => {
|
|
|
this.mainWin.setEnabled(true);
|