Alright, Compiz tends to be the main problem with stuff like this. If that's not the problem, I don't know what is... Running your app from terminal, screenshotting, and then checking out what changed about the terminal output might help. Maybe it's doing something weird when capturing the screen output?