From c0c41f8fa573cda515b631efc3767281b8109a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=BF=97=E8=B6=85?= Date: Fri, 24 Dec 2021 10:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=20F11=20=E8=BF=9B=E5=85=A5/?= =?UTF-8?q?=E9=80=80=E5=87=BA=E5=85=A8=E5=B1=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main/app.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d9723aa..11c0ac0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "global-navigation-satellite-system", "description": "global-navigation-satellite-system", "author": "hwasmart", - "version": "5.5.6", + "version": "5.5.7", "main": "dist/main/app.js", "scripts": { "dev": "vite", diff --git a/src/main/app.ts b/src/main/app.ts index aa615d3..69e3ed9 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow } from 'electron' +import { app, globalShortcut, BrowserWindow } from 'electron' import { join } from "path" function createWindow() { @@ -19,7 +19,12 @@ function createWindow() { } } -app.whenReady().then(createWindow) +app.whenReady().then(() => { + createWindow() + + // 屏蔽 F11 进入/退出全屏功能 + globalShortcut.register('F11', () => {return}) +}) app.on('window-all-closed', () => { if (process.platform !== 'darwin') {