fix fullscreen on Windows
The win.isFullScreen() state takes a second to update so we should just pass the state manually into onToggleFullScreen().
This commit is contained in:
@@ -2,9 +2,10 @@ module.exports = {
|
||||
init: init
|
||||
}
|
||||
|
||||
var electron = require('electron')
|
||||
var debug = require('debug')('webtorrent-app:ipcMain')
|
||||
var electron = require('electron')
|
||||
var ipcMain = electron.ipcMain
|
||||
var menu = require('./menu')
|
||||
var windows = require('./windows')
|
||||
|
||||
function init () {
|
||||
@@ -28,8 +29,8 @@ function init () {
|
||||
setProgress(progress)
|
||||
})
|
||||
|
||||
ipcMain.on('toggleFullScreen', function (e) {
|
||||
windows.main.setFullScreen(!windows.main.isFullScreen())
|
||||
ipcMain.on('toggleFullScreen', function (e, flag) {
|
||||
menu.toggleFullScreen(flag)
|
||||
})
|
||||
|
||||
ipcMain.on('setTitle', function (e, title) {
|
||||
|
||||
Reference in New Issue
Block a user