Heavy-quark correlations in photon-hadron collisions