only focus a client if it is visible
fix stupid infinite loop
add create-client-hook