Permalink
Browse files

fix(Windows): Hide title bar when in fullscreen

  • Loading branch information...
adlk committed Mar 28, 2018
1 parent 4d6bb5f commit 655a6ed192bb1942b641f073b8f0db10c8692374
Showing with 12 additions and 3 deletions.
  1. +3 −1 src/components/layout/AppLayout.js
  2. +1 −0 src/containers/layout/AppLayoutContainer.js
  3. +8 −2 src/stores/AppStore.js
@@ -43,6 +43,7 @@ const messages = defineMessages({
@observer
export default class AppLayout extends Component {
static propTypes = {
isFullScreen: PropTypes.bool.isRequired,
sidebar: PropTypes.element.isRequired,
services: PropTypes.element.isRequired,
children: PropTypes.element,
@@ -69,6 +70,7 @@ export default class AppLayout extends Component {
render() {
const {
isFullScreen,
sidebar,
services,
children,
@@ -90,7 +92,7 @@ export default class AppLayout extends Component {
return (
<div>
<div className="app">
{isWindows && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />}
{isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />}
<div className="app__content">
{sidebar}
<div className="app__service">
@@ -106,6 +106,7 @@ export default class AppLayoutContainer extends Component {
return (
<AppLayout
isFullScreen={app.isFullScreen}
isOnline={app.isOnline}
showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar}
appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED}
@@ -17,6 +17,8 @@ import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '..
const { app } = remote;
const mainWindow = remote.getCurrentWindow();
const defaultLocale = DEFAULT_APP_SETTINGS.locale;
const autoLauncher = new AutoLaunch({
name: 'Franz',
@@ -48,6 +50,8 @@ export default class AppStore extends Store {
@observable isClearingAllCache = false;
@observable isFullScreen = mainWindow.isFullScreen();
constructor(...args) {
super(...args);
@@ -80,6 +84,10 @@ export default class AppStore extends Store {
window.addEventListener('online', () => { this.isOnline = true; });
window.addEventListener('offline', () => { this.isOnline = false; });
mainWindow.on('enter-full-screen', () => { this.isFullScreen = true; });
mainWindow.on('leave-full-screen', () => { this.isFullScreen = false; });
this.isOnline = navigator.onLine;
// Check if Franz should launch on start
@@ -170,8 +178,6 @@ export default class AppStore extends Store {
this.actions.service.setActive({ serviceId });
const mainWindow = remote.getCurrentWindow();
if (isWindows) {
mainWindow.restore();
} else if (isLinux) {

0 comments on commit 655a6ed

Please sign in to comment.