Negligent discharge. Rule 1 & 2 violation. Might want to review Jeff Cooper's Rules for Gun Safety.
Rule One -
All guns are always loaded.
Rule Two -
Never let the muzzle cover anything you are not willing to destroy.
Your avatar pic is a Rule 2 & 3 violation
Rule Three -
Keep your finger off the trigger until your sights are on target.
The XD is a single-action design, meaning it is fully cocked by racking the slide. The XD operates like a Glock with a grip safety. As with the Glock, the trigger design does not fit any traditional classification, so Springfield coined its own terminology and dubbed it the USA (Ultra Safety Assurance) trigger safety.
Dropping the mag and locking the slide back before handing over a gun is more than just good manners. Q.E.D.