Just to double check, you're using the Mail.app that came with the system, or a different mail program?
Does this behaviour happen with other windows (ie Finder, Safari, etc)?
I'm guessing you've rebooted...
Try it in safe mode (turn on the computer and immediately hold shift... release shift after you see the apple/gear and a progress bar). If it doesn't happen there, consider removing all login items (apple >> system preferences >> users and groups >> login items), rebooting, and try again. Make a note of what login items you had in case you this doesn't work and you want to return them. If it happens here, too... then...
If you have an IMAP mail account, create a new user (apple >> system preferences >> users and groups >> click +) and setup mail in a test account and see if it does the same thing.
Try that for starters.