summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/components/HeaderBar.js5
-rw-r--r--app/components/HeaderBarPlatformStyles.android.js2
-rw-r--r--app/components/HeaderBarPlatformStyles.js16
-rw-r--r--app/components/HeaderBarStyles.js3
-rw-r--r--app/lib/backend.js3
-rw-r--r--app/main.js19
6 files changed, 39 insertions, 9 deletions
diff --git a/app/components/HeaderBar.js b/app/components/HeaderBar.js
index 6e5864aa0f..6f44ff7a00 100644
--- a/app/components/HeaderBar.js
+++ b/app/components/HeaderBar.js
@@ -10,6 +10,7 @@ import {
import Img from './Img';
import styles from './HeaderBarStyles';
+import platformStyles from './HeaderBarPlatformStyles';
export type HeaderBarStyle = 'default' | 'defaultDark' | 'error' | 'success';
export type HeaderBarProps = {
@@ -31,7 +32,7 @@ export default class HeaderBar extends Component {
render() {
let containerClass = [
styles['headerbar'],
- styles[process.platform],
+ platformStyles[process.platform],
styles['style_' + this.props.style]
];
@@ -50,7 +51,7 @@ export default class HeaderBar extends Component {
{this.props.showSettings ?
<Button style={ styles.settings } onPress={ this.props.onSettings } testName="headerbar__settings">
- <Img height={24} width={24} source='icon-settings' style={ styles.settings_icon } hoverStyle={ styles.settings_icon_hover }/>
+ <Img height={24} width={24} source='icon-settings' style={[ styles.settings_icon, platformStyles.settings_icon ]} hoverStyle={ styles.settings_icon_hover }/>
</Button>
: null}
</View>
diff --git a/app/components/HeaderBarPlatformStyles.android.js b/app/components/HeaderBarPlatformStyles.android.js
new file mode 100644
index 0000000000..f2f97beb65
--- /dev/null
+++ b/app/components/HeaderBarPlatformStyles.android.js
@@ -0,0 +1,2 @@
+import { createViewStyles } from '../lib/styles';
+export default { ...createViewStyles({}) };
diff --git a/app/components/HeaderBarPlatformStyles.js b/app/components/HeaderBarPlatformStyles.js
new file mode 100644
index 0000000000..241bdb1a60
--- /dev/null
+++ b/app/components/HeaderBarPlatformStyles.js
@@ -0,0 +1,16 @@
+// @flow
+import { createViewStyles } from '../lib/styles';
+
+export default {
+ ...createViewStyles({
+ darwin: {
+ paddingTop: 24,
+ },
+ linux: {
+ WebkitAppRegion: 'drag',
+ },
+ settings_icon: {
+ WebkitAppRegion: 'no-drag',
+ },
+ })
+};
diff --git a/app/components/HeaderBarStyles.js b/app/components/HeaderBarStyles.js
index 8c744ffcfb..c3e0e2ad5c 100644
--- a/app/components/HeaderBarStyles.js
+++ b/app/components/HeaderBarStyles.js
@@ -20,9 +20,6 @@ export default {
paddingLeft: 0,
paddingRight: 0,
},
- darwin: {
- paddingTop: 24,
- },
style_defaultDark: {
backgroundColor: colors.darkBlue,
},
diff --git a/app/lib/backend.js b/app/lib/backend.js
index 6f54b1b26e..941f73dc48 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -485,7 +485,8 @@ export class Backend {
this._ipc.registerStateListener(newState => {
const connectionState = this._securityStateToConnectionState(newState);
- log.debug('Got new state from backend ${newState}, translated to ${connectionState}');
+ log.debug(`Got new state from backend {state: ${newState.state}, \
+ target_state: ${newState.target_state}}, translated to '${connectionState}'`);
this._dispatchConnectionState(connectionState);
this.sync();
});
diff --git a/app/main.js b/app/main.js
index df7f9fbf50..dc3b5f4c86 100644
--- a/app/main.js
+++ b/app/main.js
@@ -161,6 +161,11 @@ const appDelegate = {
await appDelegate._installDevTools();
window.openDevTools({ mode: 'detach' });
}
+
+ // Tray icon might not be supported on all linux distributions
+ if (process.platform === 'linux') {
+ window.show();
+ }
},
onAllWindowsClosed: () => {
@@ -294,6 +299,7 @@ const appDelegate = {
},
_createWindow: (): BrowserWindow => {
+ log.debug('Main process PID - ', process.pid);
const contentHeight = 568;
const options = {
width: 320,
@@ -302,6 +308,7 @@ const appDelegate = {
maximizable: false,
fullscreenable: false,
show: false,
+ frame: false,
webPreferences: {
// prevents renderer process code from not running when window is hidden
backgroundThrottling: false,
@@ -317,7 +324,6 @@ const appDelegate = {
...options,
// 12 is the size of transparent area around arrow
height: contentHeight + 12,
- frame: false,
transparent: true
});
@@ -331,10 +337,15 @@ const appDelegate = {
// setup window flags to mimic an overlay window
return new BrowserWindow({
...options,
- frame: false,
transparent: true
});
+ case 'linux':
+ return new BrowserWindow({
+ ...options,
+ show: true,
+ });
+
default:
return new BrowserWindow(options);
}
@@ -515,7 +526,9 @@ const appDelegate = {
// setup event handlers
window.on('close', () => window.closeDevTools());
- window.on('blur', () => !window.isDevToolsOpened() && window.hide());
+ if (process.platform !== 'linux') {
+ window.on('blur', () => !window.isDevToolsOpened() && window.hide());
+ }
if(process.platform === 'darwin') {
// disable icon highlight on macOS