Garry Kane, 41, lived with Kathleen Milward, 87, as his mother had thrown him out, the High Court in Dumbarton heard.
David McFarlane, 50, who had been selling Kane heroin in the months leading up to the death, met Kane at around 7.30pm, on the day Ms Milward was killed. He said: "I started slating him because his old granny was pissed off at him. I said 'did you get an earful' and he said 'aye'."
Mr McFarlane said he then met Kane again on January 4, a day after Mrs Milward had been killed.
He told the court he arranged to meet Kane at 2.55pm, but Kane made no mention his grandmother had been killed.
He said: "Garry jumped into the passenger seat [of his car]. That wasn't normal, I usually give it to them out the window and go but Garry jumped in. He seemed his usual self. I asked him if his old granny has given him an ear bashing. He said 'aye, I would love to give her a slap'. But it was meant in fun, there was no bad malice."
The court also heard from Ryan Black, 32, who sold Kane £40 worth of heroin on the day Ms Milward died. He said Kane had stayed at his house for an hour as he smoked the class A drug.
Kane, 41, denies murdering 87-year-old Mrs Milward at her home in Stonehouse, South Lanarkshire, on January 3 of this year.
The trial, before Lord Matthews, continues.