Re: [AD] Menus not honoring gui screen

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


On Sun, 2005-08-21 at 19:41 +0200, Evert Glebbeek wrote:
> On Sunday 21 August 2005 18:07, Elias Pschernig wrote:
> > Things get even worse though, namely if gui_screen is the same as
> > _mouse_screen, but both are not screen, then scare_mouse does nothing,
> > because of this in scare_mouse:
> > 
> [...]
> > 
> > What is the idea behind this?
> 
> The idea behind it is that scare_mouse() does nothing if a hardware cursor 
> is in use and the mouse is being displayed on the physical screen.

Well, right now, it does nothing if a hardware cursor is in use, or if
the mouse is not displayed on the screen. I.e. it only does anything if
it is on the screen and not a hardware cursor.

> > If I draw the mouse to a memory bitmap, 
> > then there is just as much reason to hide the cursor during drawing
> > operations as there is on the screen.
> 
> Yes. Have you checked that it really doesn't?

Well, I see it in the code. I have no idea if drawing the mouse to a
memory bitmap works at all though..

> As an aside, it's a bit silly to asynchronously draw the mouse to a memory 
> surface. ;)

Yes, it certainly is, completely and utterly :P Maybe we should simply
disallow it in the docs (since maybe it already doesn't work anyway)..
then just need to make sure the same check as in scare_mouse also is in
draw_mouse, and done.

It simply would mean, the parameter to show_mouse is an on/off
parameter. Pass screen to show it, NULL to hide it. Other bitmaps are
disallowed.

> 
> > But, before I make a patch to 
> > remove that "if", I better ask here.. I feel there's something I'm
> > overlooking.
> 
> Yes, removing it probably isn't a good idea for the reason I gave above. 
> Better make an additional check for the case you mentioned, and maybe 
> clean up the code a bit ;)
> From what I remember, scare_mouse() is quite a mess.

Yes, the whole asynchronous mouse drawer is a mess..

Argh. Whenever I touch the GUI code, it feels like such a can of worms..

-- 
Elias Pschernig





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