applied Andreas Amanns' netwm_client_list patch, but with some indentation fixes