These are a real pain. Thre should be a pin that slides in the top track, it could have rolled left of right in the track, This pin slides into the metal groove that is mounted on the top of the door, and that white plastic hook in your picture rotates around and clicks around the top pin holding the pin into the metal groove on the door. That click is pretty weak though and it is easy to come loose especially with kids that are not real gentle on doors. I have had to fix mine many times.
2000 F-350 Dually, 7.3, 4X4
2012 Silverback 35QB4