Hide title bar on macOS

This commit is contained in:
Evan Hahn 2021-02-01 14:01:25 -06:00 committed by GitHub
parent b672d33f25
commit ddebbf8121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 297 additions and 24 deletions

View file

@ -113,6 +113,10 @@ try {
ipc.send('show-window');
};
window.titleBarDoubleClick = () => {
ipc.send('title-bar-double-click');
};
window.setAutoHideMenuBar = autoHide =>
ipc.send('set-auto-hide-menu-bar', autoHide);
@ -142,6 +146,19 @@ try {
Whisper.events.trigger('setupAsStandalone');
});
{
let isFullScreen = config.isFullScreen === 'true';
window.isFullScreen = () => isFullScreen;
// This is later overwritten.
window.onFullScreenChange = _.noop;
ipc.on('full-screen-change', (_event, isFull) => {
isFullScreen = Boolean(isFull);
window.onFullScreenChange(isFullScreen);
});
}
// Settings-related events
window.showSettings = () => ipc.send('show-settings');