Re: [AD] scare_mouse_area |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, Dec 19, 1999 at 05:41:57PM +0000, Shawn Hargreaves wrote:
> > However, when I tested it, it sometimes leaves artifacts on the screen
>
> I think that's because you don't freeze the mouse before checking
> coordinates, so it can move in between when you decide that it's outside the
> box, and when you freeze it.
Wow! That's only a few tens cycles at most if some branches predictions get
missed! Didn't think of this one... Nice shot Shawn ;)
> I've also changed it to use a separate flag stack for remembering the freeze
> states: it seems a bit hackish to put that in a magic pointer value :-) Also
Err, yes :)
I wondered a bit, and then decided to add the less things possible ;) Since
NULL was also used.... But it's cleaner to add another stack *grin* :)
> having a dedicated place to store this allows it to respect the existing
> freeze state, in case the user had already frozen the mouse before calling
> this routine.
It did already, doesn't it ?? I incremented and decremented the flag, so
this shouldn't discard any user selected frozen state ? Or Did I miss
something ?
> I wonder if it would be worth making all the GUI objects use this? On the
> one hand that would reduce flicker quite a bit, but on the other hand, not
> all the standard objects draw entirely inside their rectangle (some have a
> one pixel shadow, or grab handles, etc), and it seems very likely that other
> widgets people have written might also be a bit lax about this, so I don't
> know whether we can risk assuming everyone will stick exactly to their
> stated widget sizes...
For my custom widgets, I always use subbitmaps, so all is automatically
clipped to the declared rectangle. This policy would be benefitial to Allegro's
widgets I think, if there was not this backward compatibility.
But I won't talk any more about the GUI things, I did it too much already ;)
--
Vincent Penquerc'h
Windows NT - New Trial