skipTaskbar only on close master
skipTaskbar only on close

--- a/app/main.js
+++ b/app/main.js
@@ -73,7 +73,7 @@
 
 // Keep a global reference of the window object, if you don't, the window will
 // be closed automatically when the JavaScript object is garbage collected.
-let appMainWindow
+let appMainWindow;
 let appMenuInstance;
 
 function createWindow() {
@@ -82,7 +82,7 @@
     let size = electronScreen.getPrimaryDisplay().workAreaSize;
     let width = 9 * size.width/10;
     let height = 9 * size.height/10;
-    appMainWindow = new BrowserWindow({width: width, height: height, show: true, skipTaskbar: true});
+    appMainWindow = new BrowserWindow({title : 'DeadlineApp', width: width, height: height, show: true});
 
     // and load the index.html of the app.
     let loaded = appMainWindow.loadURL('http://deadline-app.dev.webstyler.ro/backend_base/backend-dashboard');
@@ -105,11 +105,12 @@
     appMainWindow.on('close', function(event) {
         event.preventDefault();
         this.hide();
+        this.setSkipTaskbar(true);
     });
 
     appMainWindow.on('minimize', function() {
         // Hide window
-        this.hide();
+        //this.hide();
     });
 
     /*appMainWindow.setThumbarButtons([

--- a/app/menus.js
+++ b/app/menus.js
@@ -46,10 +46,12 @@
         this.trayInstance.on('double-click', function() {
             //instance.handleNotification();
             instance.appMainWindow.show();
+            instance.appMainWindow.setSkipTaskbar(false);
         });
         this.trayInstance.on('click', function() {
             //instance.handleNotification();
             instance.appMainWindow.show();
+            instance.appMainWindow.setSkipTaskbar(false);
         });
         return this;
     }

--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
 {
   "name"    : "DeadlineApp",
   "description" : "DeadlineApp by Webstyler",
-  "version" : "0.2.4",
+  "version" : "0.2.5",
   "main"    : "main.js"
 }

comments