When windows get grouped to a single button in the task bar, you can no longer hide a window from this group. Clicking on the task bar button causes the pop-up menu to steal focus. This means the window which I was trying to hide gets deactivated, so clicking on the menu entry only reactivates the window, instead of hiding it. This is a regression from KDE 4.
On the other hand starting in 5.8 you can use the keyboard to navigate the popup menu for which it needs to have focus. We have a conflict here. Not sure what to do. Usability?
Oh, did not know that. Perhaps check which window has the focus before setting focus to the menu?
The context menu for grouped objects should affect all items. But I agree with Christoph that we should keep the focus where it is. Microsoft Windows shows a menu on left click where the active window is highlighted (focus goes from the window itself to this menu entry). When the user right clicks a menu item the respective window comes into foreground and the common window menu pops up with the option to minimize etc.
This is a broader problem. There's a similar issue where clicking the active window to minimize it from a Task Manager on the desktop containment doesn't work, because the initial press makes the desktop gain focus, which removes the IsActive state from the window, and minimize only happens when IsActive is true. The code needs to handle this generally for both cases to work. It's on my todo.
*** This bug has been marked as a duplicate of bug 366732 ***
Not sure if bug 366732 was really fixed, but the issue reported here is still reproducible with today's master, so these might need a different fix. Reopening.
When a Task is grouped, there are at least two ways to minimize specific windows: - Hover over grouped Task, right-click on thumbnail of window you want to minimize > More > Minimize - Configure grouped Tasks to show the Group Dialog or thumbnails when clicked > right-click the entry in the group dialog or thumbnail for the window you want to minimize > More > Minimize