Prefer (any) group transient leader for next focus
Review Request #123691 - Created May 8, 2015 and submitted
When reading bug #347437 me thought "humm? we should pass the focus from the open dialog to the kate window anyway" and had a look.
The reason is that kate/kwrite (many) dialogs do not actually have a transient leader but are transient for a group of windows.
If that group currently has only one entry, it seems safe to pass the focus there instead (it effectively the Client::transientFor())
Originally I wanted to allow this for any amount of leaders and picked the first one, but that means if you open 2 kwrite windows (from one PID!) and an open dialog for kwrite #2 and close the latter, the focus would be passed to kwrite #1
-> The focus chain is the better choice here.
(One could look up all leaders in the focus chain OR the stack and use the most recent/top one, but that's probably voodoo)