Could the real issue be switching between black-and-white cursors,
and color cursors?
It is possible that on some video hardware, one is supported on the
card, and the other is not, so the system would need to do handstands
to switch between the two.
You could try modifying the attached code to create a color image
instead of a black-and-white one.
On Aug 28, 2007, at 6:36 PM, Lyndsey Ferguson wrote:
Hello Everyone,
I've been meaning to write this email-list a nice letter stating
how much I
appreciate everyone's help and being a part of the community (even
if I wait
to contribute until I see no one knows an answer) - however, now is
not that
moment :)
I've been struggling with a problem that I would appreciate your
suggestions
on. I believe I have exhausted my options, but I thought I would
check with
my peers to see if they have any other ideas.
Our application is switching over to a system where we are using
NSCursor
for the majority (not all - time constraints) of our cursors. It
works quite
nicely. I didn't write the code, but it was written by a Software
Engineer
who did a good job.
Unfortunately, he's gone and we are experiencing some issues. It
seems that
on the PowerPC (Tiger and Leopard), when the application switches
the cursor
from a Carbon cursor (via MacGetCursor and MacSetCursor) to a Cocoa
cursor
(via NSImage to NSCursor and NSCursor's -set function) one can see
a flicker
of the Carbon cursor in the vicinity of the mouse position (not
where the
hotspot is).
I thought that perhaps the issue was switching between the two
types. So as
a test, I changed the code to not switch to a Carbon cursor ever,
but switch
to another Cocoa based cursor. Flicker was gone. Yay, I thought.
So my next step was to find a way to create a Cocoa based cursor
from the
Carbon CursHandle. I found some code on the internet which appears to
fulfill that intention (I've attached it for your info - it doesn't
seem to
completely work, but it displays a similar image to what is
expected). So
now, I should be switching from Cocoa cursor to Cocoa cursor.
Yet I still see a flicker.
So I thought that perhaps the call MacGetCursor, which was made in
the code
to generate the Carbon based Cocoa cursor was causing a problem. So I
changed the code so that it caches the Cocoa cursors and only calls
MacGetCursor for the first time the Carbon-based Cocoa cursor is
created.
Flicker still happens.
I've tried tracking down and logging any other call to MacSetCursor
so that
I could see if there was any legacy cursor setting while switching
between
Carbon/Carbon-based-Cocoa cursor and new Cocoa cursor. No calls to
MacSetCursor are made.
So, now I'm out of ideas. Anyone familiar with pixel copying code
able to
comment on the code I've attached with regards to correctness?
Anyone else
had to deal with this problem? Ideas? I'm ready to try any suggestion.
Thank you in advance,
Lyndsey Ferguson
--
Mr. Lyndsey D. Ferguson
Software Engineer
Nemetschek N.A., Inc.
http://www.nemetschek.net
<CreateCocoaCursorFromCarbon.cpp>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/jstiles%
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden