Assignment of input focus:
focus is assigned to the window when
* it is mapped
* it is entered by a mouse pointer

? when a window with the focus is closed, the focus should be handed to its
"transient for" parent (currently it could interferre with the entering of a
window)?
