mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +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';
|
||||
const Tray = remote.require('tray');
|
||||
|
||||
|
@ -29,7 +29,7 @@ class SystemTray {
|
|||
|
||||
_onClicked() {
|
||||
if (this._platform !== 'darwin') {
|
||||
NylasEnv.focus();
|
||||
ipcRenderer.send('command', 'application:show-main-window');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -500,7 +500,8 @@ class NylasEnvConstructor extends Model
|
|||
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: ->
|
||||
ipcRenderer.send('call-window-method', 'focus')
|
||||
window.focus()
|
||||
|
|
Loading…
Reference in a new issue