Browse Source

Fixed White Page bug on Linux

Fixes #181
pull/367/head
Ramiro Saenz 9 years ago
parent
commit
80cd7176b4
  1. 14
      app/view/preferences/Preferences.js
  2. 7
      electron/main.js

14
app/view/preferences/Preferences.js

@ -59,7 +59,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
,name: 'hide_menu_bar' ,name: 'hide_menu_bar'
,boxLabel: 'Auto-hide Menu bar (<code>Alt</code> key to display)' ,boxLabel: 'Auto-hide Menu bar (<code>Alt</code> key to display)'
,value: config.hide_menu_bar ,value: config.hide_menu_bar
,hidden: Ext.os.is.MacOS ,hidden: process.platform !== 'win32'
} }
,{ ,{
xtype: 'checkbox' xtype: 'checkbox'
@ -67,7 +67,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
,boxLabel: 'Show in Taskbar' ,boxLabel: 'Show in Taskbar'
,value: config.skip_taskbar ,value: config.skip_taskbar
,reference: 'skipTaskbar' ,reference: 'skipTaskbar'
,hidden: Ext.os.is.MacOS ,hidden: process.platform !== 'win32'
} }
,{ ,{
xtype: 'checkbox' xtype: 'checkbox'
@ -75,7 +75,7 @@ Ext.define('Rambox.view.preferences.Preferences',{
,boxLabel: 'Keep Rambox in the Taskbar when close it' ,boxLabel: 'Keep Rambox in the Taskbar when close it'
,value: config.keep_in_taskbar_on_close ,value: config.keep_in_taskbar_on_close
,bind: { disabled: '{!skipTaskbar.checked}' } ,bind: { disabled: '{!skipTaskbar.checked}' }
,hidden: Ext.os.is.MacOS ,hidden: process.platform !== 'win32'
} }
,{ ,{
xtype: 'checkbox' xtype: 'checkbox'
@ -88,7 +88,13 @@ Ext.define('Rambox.view.preferences.Preferences',{
,name: 'systemtray_indicator' ,name: 'systemtray_indicator'
,boxLabel: 'Show System Tray indicator on unread messages' ,boxLabel: 'Show System Tray indicator on unread messages'
,value: config.systemtray_indicator ,value: config.systemtray_indicator
,hidden: Ext.os.is.MacOS ,hidden: process.platform === 'darwin'
}
,{
xtype: 'checkbox'
,name: 'disable_gpu'
,boxLabel: 'Disable Hardware Acceleration (needs to relaunch)'
,value: config.disable_gpu
} }
,{ ,{
xtype: 'fieldset' xtype: 'fieldset'

7
electron/main.js

@ -29,6 +29,7 @@ const config = new Config({
,start_minimized: false ,start_minimized: false
,systemtray_indicator: true ,systemtray_indicator: true
,master_password: false ,master_password: false
,disable_gpu: process.platform === 'linux'
,proxy: false ,proxy: false
,proxyHost: '' ,proxyHost: ''
,proxyPort: '' ,proxyPort: ''
@ -380,6 +381,12 @@ ipcMain.on('image:popup', function(event, url, partition) {
// Proxy // Proxy
if ( config.get('proxy') ) app.commandLine.appendSwitch('proxy-server', config.get('proxyHost')+':'+config.get('proxyPort')); if ( config.get('proxy') ) app.commandLine.appendSwitch('proxy-server', config.get('proxyHost')+':'+config.get('proxyPort'));
// Disable GPU Acceleration for Linux
// to prevent White Page bug
// https://github.com/electron/electron/issues/6139
// https://github.com/saenzramiro/rambox/issues/181
if ( config.get('disable_gpu') ) app.disableHardwareAcceleration();
// This method will be called when Electron has finished // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
app.on('ready', function() { app.on('ready', function() {

Loading…
Cancel
Save