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