git ssb

10+

Matt McKegg / patchwork



Tree: d3217fd3e814dd22253f9d80b79107146c15219f

Files: d3217fd3e814dd22253f9d80b79107146c15219f / 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