Ryan Edward McCusker, 28, of Hereford Close, admitted causing criminal damage on March 29.
The court heard the relationship had ended 18 months previously and the couple had two sons.
Andy Conboy, prosecuting, said McCusker’s ex was woken at 3am by dogs barking and went downstairs.
“The defendant was at her back door being verbally aggressive. He threw garden furniture at the window and when she told him he wasn’t coming in he punched the window.”
He told police he had been drinking with friends and began banging on the window when he passed her home.
Andrew Osbourne, mitigating, said McCusker had a history of domestic violence, but the couple had tried to maintain contact for the sake of the children.
“Earlier on that day there had been a disagreement about contact. That was stewing all day and, having consumed alcohol, he went around and tried to resolve the situation.
“He has been absolutely frank with the probation service which has allowed them to identify several deficits in his thinking skills.”
The court heard that in the past McCusker had ruled himself out of domestic violence programmes offered by the probation service, opting instead for custody.
“His attitude to probation has changed since his last sentence,” said Mr Osbourne. “He has been forced to engage with them and address his issues.
“He has appreciated that he doesn’t want his children to see this violent and unpredictable character.”
Magistrates gave him a 24 month community order in which he must attend a building better relationships programme, and a 12 day rehabilitation activity requirement.
He must also pay court costs of £85 and a victim surcharge of £60.