git ssb

10+

Matt McKegg / patchwork



Tree: 793514d74e3ce980e5f410a04a892ce9a3fb919d

Files: 793514d74e3ce980e5f410a04a892ce9a3fb919d / modules / app / fullscreen.js

511 bytesRaw
1var nest = require('depnest')
2var electron = require('electron')
3var { Value } = require('mutant')
4
5exports.gives = nest('app.fullscreen')
6
7exports.create = function () {
8 return nest('app.fullscreen', function () {
9 var win = electron.remote.getCurrentWindow()
10 var isFullScreen = Value(win.isFullScreen())
11 win.on('enter-full-screen', function () {
12 isFullScreen.set(true)
13 })
14 win.on('leave-full-screen', function () {
15 isFullScreen.set(false)
16 })
17 return isFullScreen
18 })
19}
20

Built with git-ssb-web