On Mar 31, 2009, at 9:18 PM, Graham Cox wrote:


On 01/04/2009, at 4:46 AM, Eric Gorr wrote:

There is a bug when changing from [[NSCursor arrowCursor] set] to a NSCursor based on a 64x64 PNG.

Basically, there is some horrible cursor flickering.

For a demonstration of this bug, please check out the sample application at:

http://ericgorr.net/cocoadev/CursorFlicker.zip

I have filed a bug as well: rdar://6741558


But it's not a bug - you are making it flicker by repeatedly switching it between the two cursors.

WAYTTD?

As your while loop runs it will set the arrow cursor every 4th time (x % 2), and the large cursor otherwise. It's impossible to tell what you expected or intended, but overall it looks like a weird thing to do.

It might be easier to see the problem if you change:

[NSEvent startPeriodicEventsAfterDelay:0.1 withPeriod:.1];

to

[NSEvent startPeriodicEventsAfterDelay:0.1 withPeriod:.5];


and increase the number of iterations to 50 or something.

The cursor clearly should not jump around when one changes it. Do not move the mouse.


In the real application, there are some cursors based on 64x64 images. When switching to these cursors, one sees the cursor quickly jump to a different position and then back to where it should be. This is very jarring and shouldn't happen. Why it briefly jumps, I do not know.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to