On the day the shooter was killed, Obama gave a press conference[1] where he said:
We still don’t know all the facts. What we do know is that there’s been a vicious, calculated and despicable attack on law enforcement. Police in Dallas were on duty, doing their job, keeping people safe during a peaceful protest. These law enforcement officers were targeted, and nearly a dozen officers were shot, five were killed.... According to police there are multiple suspects. We will learn more undoubtedly about their twisted motivations, but let’s be clear, there is no possible justification for these kinds of attacks. Grave violence against law enforcement. The FBI is already in touch with the Dallas police; anyone involved in these senseless murders will be held fully accountable. Justice will be done.
Three days later he had returned from Spain (before planned) to visit the survivors, where he ... described the Dallas shooting as a "hate crime" against police, according to a top law enforcement representative in the meeting with Obama and Vice President Joe Biden. One really striking thing the president said in his opening remarks was that the shooting in Dallas in many ways was strikingly parallel to the Dylann Roof shooting in Charleston in the sense that it was a hate crime[2]
The Dallas shooting were a terrible thing, and Obama seems to have responded as one would expect a President should.
Outside the Dallas shooting, Obama himself seems to have had some issues with police behavior. But that didn't stop him saying what should be said.
[1] http://fortune.com/2016/07/08/transcript-obama-dallas-police...
[2] http://www.politico.com/story/2016/07/obama-dallas-police-sh...