Re: [AD] Problem with remove_mouse() and video bitmaps.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2005-12-30, Andrei Ellman <ae-a-alleg@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> >How's this?  The text goes in the entry for show_mouse:
> >
> >--- docs/src/allegro._tx	(revision 5645)
> >+++ docs/src/allegro._tx	(local)
> >@@ -2860,6 +2860,10 @@
> >    pointer whenever you draw onto the screen. This is not needed if you 
> >    are
> >    using a hardware cursor.
> > 
> >+   Note: you must not be showing a mouse pointer on a bitmap at the time 
> >that
> >+   the bitmap is destroyed with destroy_bitmap(). This does not apply to
> >+   `screen' since you never destroy `screen' with destroy_bitmap().
> >+
> > @@void @scare_mouse();
> > @xref unscare_mouse, scare_mouse_area, show_mouse
> > @shortdesc Helper for hiding the mouse pointer before drawing.
> 
> 
> Seems OK to me, but I would add a bit about calling show_mouse(NULL).

Done.  I gave show_mouse(NULL) as an _example_ since, strictly speaking,
the problem is also avoided by showing the mouse to an another, distinct
bitmap.

> Also, I would add something to the entry for derstroy_bitmap() about 
> making sure that show_mouse(NULL) is called if it's the bitmap that 
> contains the mouse-cursor.

Done.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/