The US president appears to recognise that Hamas could, initially at least, play a role in stopping lawlessness in the war-torn enclave.