git ssb

10+

Matt McKegg / patchwork



Tree: c549875364d3c94d316780d4b18d4b6c0f92e23a

Files: c549875364d3c94d316780d4b18d4b6c0f92e23a / modules / app / fullscreen.js

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

Built with git-ssb-web