In this note, a necessary and sufficient condition for a trivial extension to be a left p.p.-ring is obtained. As an application, we determine when a trivial Morita context is a left p.p.-ring, and a result of Xue [On p.p. rings, Kobe J. Math. 7 (1990) 77-80] characterizing triangular p.p.-rings follows immediately.