06/25/2010 AT 5:10 PM ET
The pop star, who was joined by parents Jamie and Lynne Spears, and her ex-husband arrived separately at a San Fernando Valley school Thursday, but met up briefly. Preston, 4, and Jayden, 3, were later treated to McDonald’s Happy Meals after the ceremony, says a source.
Spears, 28, “was very excited about her boys’ graduation and she dressed them up for the festive occasion,” the source says.
The exes, who tied the knot in 2004, split in late 2006 before finalizing their divorce a year later. A custody settlement reached in 2008 gave Federline, 32, sole custody of the kids while Spears, who is under the conservatorship of her father, was allowed several weekly visits.
Reporting by PERNILLA CEDENHEIM