Re: [AD] Menus not honoring gui screen

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


On Sunday 21 August 2005 02:22 pm, Elias Pschernig wrote:
> On Sun, 2005-08-21 at 13:48 -0700, Chris wrote:
> > What about other video bitmaps? If you're using page flipping, with no
> > hardware cursor, and a GUI pops up on a non-main-screen page, you'll want
> > to show it on that video bitmap.
>
> And that actually works?

I don't see why not. That's the reason for being able to change the GUI 
screen, after all. Would be kinda dumb if you could change the GUI screen to 
another video bitmap, but leave the mouse stuck on the screen.

> > I believe it would be better to have the docs say that using it on
> > non-video bitmaps is dangerous and deprecated (due to the async drawing
> > and that
>
> Well, showing it on video bitmaps is just as dangerous :)

No it isn't, because video bitmaps have mutex's associated with them through 
acquire/release. The two threads wouldn't be able to write to them 
simultaniously. There's no difference between "screen" and a second (or 
third) video bitmap, other than which one is currently visible.. as far as 
Allegro is concerned.

> > there's no mutex's in place), and showing it on a non-visible buffer is
> > just wasteful.
>
> Well, not just wasteful, but impossible right now to do properly since
> there's no scare_mouse.

You can scare_mouse a video bitmap. When you check against screen, it checks 
against all other video bitmaps since video bitmaps are conceptually 
sub-bitmaps of the screen. Weren't their hacks put in place for 
non-single-surface VRAM pages for this? I could've sworn that's how it 
behaves. Checking _mouse_screen against screen with is_same_bitmap should be 
enough to allow it to work on video bitmaps.

> I attached a patch which allows it.

I thought we were going to disallow the mouse on a memory bitmap? Or rather, 
strongly discourage it, so programs that do use it won't break (though it 
could be argued they're already broken). There's no point in being able to 
scare the mouse from a memory bitmap, just like there's no point in showing 
it on a memory bitmap.




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