MCPcopy
hub / github.com/agalwood/Motrix / initWindowManager

Method initWindowManager

src/main/Application.js:443–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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')

Callers 1

initMethod · 0.95

Calls 4

storeWindowStateMethod · 0.95
getUserConfigMethod · 0.80
showMethod · 0.80
hideMethod · 0.80

Tested by

no test coverage detected