Files: c549875364d3c94d316780d4b18d4b6c0f92e23a / modules / app / fullscreen.js
487 bytesRaw
1 | var nest = require('depnest') |
2 | var { computed, Value } = require('mutant') |
3 | |
4 | exports.gives = nest('app.fullscreen') |
5 | |
6 | exports.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