fix: fullscreen button not working

This commit is contained in:
talksik
2026-03-25 15:54:42 -07:00
parent d525d6a588
commit 739bb0cf80
4 changed files with 8 additions and 1 deletions
+5
View File
@@ -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 ---