fix: fullscreen button not working
This commit is contained in:
@@ -28,6 +28,7 @@ const createWindow = () => {
|
||||
width: 715,
|
||||
height: 550,
|
||||
resizable: false,
|
||||
fullscreenable: true,
|
||||
frame: false,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
@@ -60,6 +61,10 @@ ipcMain.on('window:maximize', (event) => {
|
||||
ipcMain.on('window:close', (event) => {
|
||||
BrowserWindow.fromWebContents(event.sender)?.close();
|
||||
});
|
||||
ipcMain.on('window:fullscreen', (event) => {
|
||||
const win = BrowserWindow.fromWebContents(event.sender);
|
||||
if (win) win.setFullScreen(!win.isFullScreen());
|
||||
});
|
||||
|
||||
// --- Link metadata ---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user