如果大家测试出mac平台下全屏后第二个和第三个红绿灯能高亮,就发代码
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 980,
minWidth: 980,
minHeight: 650,
height: 650,
// frame:false,
titleBarStyle: "hidden",
minimizable: true,
maximizable: true,
transparent: false,
// visualEffectState: "active",
// vibrancy: "fullscreen-ui",
alwaysOnTop: true,
// fullscreenable:false,
// opacity:0.9,
// fullscreen:true,
closable: true,
webPreferences: {
// devTools:false,
nodeIntegration: true, //在渲染进程启用Node.js
contextIsolation: true,
webSecurity: true,
backgroundThrottling: false,
preload: path.join(__dirname, 'preload.js'),
},
});
// and load the index.html of the app.
if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL);
} else {
mainWindow.loadFile(path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`));
}
mainWindow.webContents.openDevTools();
};