myszha/qt-ponies — pull request #2 by dtfinch (2012-03-21 06:49:43+00:00)
Title: OS X windowing fixes and a minor speed tweak.

I recently got a Mac for side work and tried installing qt-ponies on it. It mostly worked except that the ponies had shadows that lagged behind the animation, only updating every half second or so. And ponies would disappear whenenever qt-ponies lost focus.

The shadows could be removed by setting the Qt::WA_MacNoShadow window attribute, but it's only supported on Qt 4.8 and later. The default version provided by MacPorts (qt4-mac) is only 4.7, but the testing package (qt4-mac-devel) is up to date.

The second issue was because windows with the Qt::Tool attribute are hidden by design on Qt for Mac when application focus is lost. Removing the attribute on Mac didn't seem to hurt anything.

I also noticed that speed is increased when moving diagonally. I figured the sqrt(2*speed*speed) was a mistake (basically 1.4*speed) and changed it to just speed.