This clamp on lock can be used for sliding glass doors when installing a pet door for patio doors, and works for some windows when installing a window cat flap.
This is about as basic as a lock gets. It simply clamps to the track by means of a thumb screw. When installed behind the sliding glass door it will prevent the door from opening. This lock comes with the Thermo Panel 3e panel pet door for sliding glass doors.
There are many different locks that will work with a sliding glass dog door insert. Any lock that prevents the door from opening will suffice. Other options include the Wedgit Charlie Bar, pin locks, or even just a dowel cut to length to fit behind the sliding door. The pet door is already captured on 3 sides, the tracks top and bottom and the wall. If you can't slide the sliding door away from the pet door, the pet door is trapped and can't be removed.