Re: [AD] Two custom mouse cursor patches |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Two custom mouse cursor patches
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Tue, 16 Sep 2008 22:50:09 -0400
Ok, I've commited a slightly cleanedup version of my previous patch.
Quirks and comments are in the commit log, but I'll recap here.
I changed my mind about moving the functions into qzmouse.m, because
in the design the mouse cursor display functions live in the graphics
driver vtable, not the mouse driver vtable. Since qzmouse.m also
depends on osxgl.h, I don't think there's a clear reason to do it
otherwise since the argument that qzmouse.m is seperate from the
OpenGL code doesn't hold. Maybe it should, but that's another matter.
It's easily changed later on anyway.
The mouse pointer is set to the system default if you switch in to
the window and doesn't get changed until you move the mouse in and
out of the window (triggering a mouseEntered event). I tried setting
the mouse cursor explicitly in various places but to no avail. I'mm
not sure what sort of event signaled when the window becomes active,
I assumed windowDidBecomeMain. I read through the NSView guide as
well, but couldn't find a solution.
The mouse cursor doesn't get set in fullscreen mode. At all. I can
turn it on and off (using the same functions as for the windowed
code, any reason there are seperate functions to hide and unhide the
mouse in fullscreen mode?) but I can't get it to change. Google was
no help, nor where the NSView and NSCursor references.
When using multiple windows the code behaves a bit strange. It seems
to work well for a bit, changing the cursor whenever the mouse leaves
one window and enters the next, but things get a bit weird after a
while. The shape is either lost completely, or seems to get swapped
between the two windows. This might be related to the first issue, I
don't know. I made an attempt at fixing this but didn't try very hard.
Evert