It's really annoying when a sliding door won't shut completely. Adding a couple of magnets can help it shut all the way every time.
Your sliding door might be able to latch if you hold it and lock it, but when you don't want it locked all the time it becomes a nuisance. YouTuber kipkay fixed the problem with the first tip in the video above using two neodymium magnets, with one attached to the door and the other attached to the inside of the track. With some magnets and a tube of super glue, and you'll be all set.
New Lifehacks You Never Thought Of! [YouTube]