Hide application when use click on active application dock item

This commit is contained in:
DanyLE 2023-01-06 21:45:05 +01:00 committed by Dany LE
parent ea160c2ccb
commit cb9ccb576f
2 changed files with 9 additions and 1 deletions

View File

@ -293,7 +293,14 @@ namespace OS {
} }
if(collection.length == 1) if(collection.length == 1)
{ {
collection[0].app.trigger("focus"); if(PM.getActiveApp() == collection[0].app)
{
collection[0].app.hide();
}
else
{
collection[0].app.show();
}
resolve(collection[0].app); resolve(collection[0].app);
return; return;
} }

View File

@ -104,6 +104,7 @@ namespace OS {
get blur_overlay(): boolean { get blur_overlay(): boolean {
return this.hasattr("blur-overlay"); return this.hasattr("blur-overlay");
} }
/** /**
* Setter: set menu open event handler * Setter: set menu open event handler
* *