Re: [AD] [ alleg-Bugs-2431768 ] display field for mouse state |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On 15-Dec-08, at 8:26 PM, Peter Wang wrote:
How would this work: when the mouse cursor leaves the tracking rectangle for a the window, the "mouse window" is set to NULL, when the mouse cursor enters the tracking rectangle of a window the "mouse window" is set to that window?Yes, that's what I'm thinking.
Ok, great.
I added "probably" for a reason. It seems to be a reasonable behaviour.Otherwise, what would you report if the mouse is not over any of our windows?
I agree it sounds reasonable. However, we could also take the position that if the display field is NULL, the reported x and y coordinates are undefined - which is also a reasonable position to take if you ask me. It all depends on when it would be useful to track the location of the mouse in the superview. The only one I can think of is if you want to emulate mouse mickeys, but that will be tricky because the coordinates change discontinuously when the mouse leaves the last window's tracking rectangle (as they do when they move from one window to another of course).
Evert
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |