Man head-butted ex-partner after reading Facebook messages, court told