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