Browse Source

window management fixes (fixes #426)

Eugene Pankov 7 years ago
parent
commit
e403a423b7
2 changed files with 5 additions and 1 deletions
  1. 4 0
      app/lib/index.ts
  2. 1 1
      terminus-core/src/components/windowControls.component.pug

+ 4 - 0
app/lib/index.ts

@@ -26,6 +26,10 @@ app.on('activate', () => {
     }
 })
 
+app.on('window-all-closed', () => {
+    app.quit()
+})
+
 process.on('uncaughtException' as any, err => {
     console.log(err)
     application.broadcast('uncaughtException', err)

+ 1 - 1
terminus-core/src/components/windowControls.component.pug

@@ -9,7 +9,7 @@ button.btn.btn-secondary.btn-maximize(
     svg(version='1.1', width='10', height='10')
         path(d='M 0,0 0,10 10,10 10,0 Z M 1,1 9,1 9,9 1,9 Z')
 button.btn.btn-secondary.btn-close(
-    (click)='hostApp.quit()',
+    (click)='hostApp.getWindow().close()',
 )
     svg(version='1.1', width='10', height='10')
         path(d='M 0,0 0,0.7 4.3,5 0,9.3 0,10 0.7,10 5,5.7 9.3,10 10,10 10,9.3 5.7,5 10,0.7 10,0 9.3,0 5,4.3 0.7,0 Z')