fix bug with 'Show All' in taskbar items

This commit is contained in:
jelveh 2024-12-10 17:04:33 -08:00
parent 1dc2a6af81
commit df34ee048a
2 changed files with 6 additions and 11 deletions

View File

@ -88,16 +88,8 @@ function UITaskbarItem(options){
);
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
clicked_window.showWindow();
$(`.window[data-app="${options.app}"]`).showWindow();
}
})
@ -228,8 +220,7 @@ function UITaskbarItem(options){
menu_items.push({
html: i18n('show_all_windows'),
onClick: function(){
if(open_windows > 0)
$(el_taskbar_item).trigger('click');
$(`.window[data-app="${options.app}"]`).showWindow();
}
})
// -------------------------------------------

View File

@ -3420,6 +3420,10 @@ $.fn.showWindow = async function(options) {
});
$(el_window).css('z-index', ++window.last_window_zindex);
$(el_window).attr({
'data-is_minimized': true,
})
setTimeout(() => {
$(this).focusWindow();
}, 80);