mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-11 08:52:11 +08:00
fix(tray): On Win32 / Linux click should open main window if closed
This commit is contained in:
parent
9371f7f9ba
commit
b4dda021b1
2 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import remote from 'remote';
|
import {remote, ipcRenderer} from 'electron';
|
||||||
import TrayStore from './tray-store';
|
import TrayStore from './tray-store';
|
||||||
const Tray = remote.require('tray');
|
const Tray = remote.require('tray');
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ class SystemTray {
|
||||||
|
|
||||||
_onClicked() {
|
_onClicked() {
|
||||||
if (this._platform !== 'darwin') {
|
if (this._platform !== 'darwin') {
|
||||||
NylasEnv.focus();
|
ipcRenderer.send('command', 'application:show-main-window');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,8 @@ class NylasEnvConstructor extends Model
|
||||||
center: ->
|
center: ->
|
||||||
ipcRenderer.send('call-window-method', 'center')
|
ipcRenderer.send('call-window-method', 'center')
|
||||||
|
|
||||||
# Extended: Focus the current window.
|
# Extended: Focus the current window. Note: this will not open the window
|
||||||
|
# if it is hidden.
|
||||||
focus: ->
|
focus: ->
|
||||||
ipcRenderer.send('call-window-method', 'focus')
|
ipcRenderer.send('call-window-method', 'focus')
|
||||||
window.focus()
|
window.focus()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue