When trying to quit, do not be in full screen mode.
+ M
This saves you from having to shut down the computer wrong and potentially damaging the hard drive.
Yup, I've learned to use this same method. Also, just so you know, it'll never lock up your computer completely even in full screen mode. Try bashing on the force quite key combo (Command-Option-Esc) until it finally force quits.