[PATCH 2/2] server: Do not detach windows if they are owned by another thread.