Hm, strange. The only thing I could think of is that the TeamViewer uses a 'special' titlebar... I tried with/without perapp (tested yet on different machines and versions of 7, just to be sure), always with the same result... Or perhaps a video driver issue ?
I remember trying to set it to exclude Teamviewer and it still not fixing the problem. I really have no idea what made the problem stop on my setup but I do know I haven't updated my video drivers since getting this laptop. Wish I could remember when it stopped doing it so I might be able to come up with a helpful suggestion but I really have no idea.