Iain Thompson had to be coaxed down by trained police negotiators after his Yuletide raid was foiled when he set off alarms.
The 46-year-old career burglar forced his way into the bakery on Kirkgate at 9.30pm on December 24 last year.
Once inside he climbed on top of a safe before making a hole in the ceiling and climbing through it.
Thompson then got onto the roof of Home restaurant, which is above the bakery, causing around £2,000 worth of damage.
Carmel Pearson, prosecuting, said Thompson triggered alarms at both premises.
She said: "The defendant was on the roof and hiding behind a chimney stack."
-> Met Office issues weather warning of snow for YorkshirePolice negotiators were called when Thompson refused to give himself up and threatened to throw himself off the roof.
He eventually agreed to come down and a cherry picker was used to get him to safety.
Officers later discovered an angle grinder and "sophisticated tools" which Thompson had used during the burglary.
Thompson, of Sutherland Terrace, Burmantofts, pleaded guilty to burglary and criminal damage.
He has 30 previous convictions for 63 offences, including 27 offences of burglary.
Richard Reed, prosecuting, said Thompson carried out the burglary as he was desperate for money for Christmas as his benefits money had not been paid.
Mr Reed said Thompson had been looking forward to spending Christmas with his family.
-> Vandals burn playground as Leeds primary school targeted againHe said: "He is beside himself to find that he is back before the court for this sort of offending.
"He has let himself down and he has let his his family down. He is beside himself with self remorse."
Thompson was jailed for 16 months.
Judge Penelope Belcher said: "This caused huge inconvenience to the police and significant public expense."