Re: [AD] Mouse cusor documentation |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
This is the current behavior anyway even when you use a software cursor. I
should have said, using a hardware cursor in Windows doesn't change mickey
behavior compared to using the software cursor, unlike X.
Using the hardware mouse in X should only change mickey behavior in
fullscreen mode.
Doesn't sound like a bad idea; although I'd have to check if it really
doesn't break anything. Technically, show_mouse() could still fail to
display a hardware cursor even if the bitmap was succesfully created.
Yes, but we know that show_mouse(NULL) will never display a cursor in
hardware or software. So why not give the user useful information (if
the current cursor is valid for hardware with the current gfx driver)
under such circumstances?
The reason I did this is because the mouse might be displayed on a
subbitmap of the screen.
Which would invite problems of its own (clipping rectangle set to the
sub-bitmap's size, or even if the mouse screen is actually even part of
the screen; aren't two video bitmaps always gauranteed to be considered
"same", regardless of single surfaces or not? It could break old
programs if it wasn't).
Anyway, thinking about it, it doesn't make much sense to display
the mouse on a subbitmap of screen only. The only reason to do that is to
restrict mouse movement, I think, and for that set_mouse_range() would be
the appropriate function.
I don't think showing the mouse on a sub-bitmap (or parent- or
sibling-bitmap) affects mouse movement.. just how/where it's drawn. And
the only other situation I can think of is page-flipping and keeping the
cursor on the visible screen by changing show_mouse to the current page.
Although if page flipping's used properly, neither page would have the
same pointer as 'screen' since they'd be seperate bitmaps (in which case
it would fall back to software rendering (since _mouse_screen != screen)
and continue to work exactly as before).
- Kitty Cat