Added "Toggling apps to minimize once it clicked" #944 feature

This commit is contained in:
Arthur
2024-12-07 15:46:01 +00:00
parent 545e7db5bd
commit 90b7e449b7

View File

@@ -73,8 +73,16 @@ function UITaskbarItem(options){
return;
if(options.onClick === undefined || options.onClick(el_taskbar_item) === false){
const clicked_window = $(`.window[data-app="${options.app}"]`)
// hide window, unless there's more than one in app group
if (clicked_window.hasClass("window-active") && clicked_window.length < 2) {
clicked_window.hideWindow();
return;
}
// re-show each window in this app group
$(`.window[data-app="${options.app}"]`).showWindow();
clicked_window.showWindow();
}
})