git ssb

1+

Daan Patchwork / patchwork



Tree: a41b2de4bfaef67496e8f450f514033779a26328

Files: a41b2de4bfaef67496e8f450f514033779a26328 / lib / depject / app / fullscreen.js

521 bytesRaw
1const nest = require('depnest')
2const electron = require('electron')
3const { Value } = require('mutant')
4
5exports.gives = nest('app.fullscreen')
6
7exports.create = function () {
8 return nest('app.fullscreen', function () {
9 const win = electron.remote.getCurrentWindow()
10 const 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