Hide application when use click on active application dock item
All checks were successful
gitea-sync/antos/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2023-01-06 21:45:05 +01:00
parent 89ccbc4b62
commit c9a3d099c5
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
* *