()
| 441 | } |
| 442 | |
| 443 | initWindowManager () { |
| 444 | this.windowManager = new WindowManager({ |
| 445 | userConfig: this.configManager.getUserConfig() |
| 446 | }) |
| 447 | |
| 448 | this.windowManager.on('window-resized', (data) => { |
| 449 | this.storeWindowState(data) |
| 450 | }) |
| 451 | |
| 452 | this.windowManager.on('window-moved', (data) => { |
| 453 | this.storeWindowState(data) |
| 454 | }) |
| 455 | |
| 456 | this.windowManager.on('window-closed', (data) => { |
| 457 | this.storeWindowState(data) |
| 458 | }) |
| 459 | |
| 460 | this.windowManager.on('enter-full-screen', (window) => { |
| 461 | this.dockManager.show() |
| 462 | }) |
| 463 | |
| 464 | this.windowManager.on('leave-full-screen', (window) => { |
| 465 | const mode = this.configManager.getUserConfig('run-mode') |
| 466 | if (mode === APP_RUN_MODE.TRAY) { |
| 467 | this.dockManager.hide() |
| 468 | } |
| 469 | }) |
| 470 | } |
| 471 | |
| 472 | storeWindowState (data = {}) { |
| 473 | const enabled = this.configManager.getUserConfig('keep-window-state') |
no test coverage detected