Re: [AD] [ alleg-Bugs-2431768 ] display field for mouse state

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


On 17 Dec 2008, at 08:13, Milan Mimica wrote:
By that you mean mouse input events, presumably. The distinction is
important.

So which window is that?

The window the mouse is over. Which need not be the same as the foreground window, or the same as the window with keyboard focus. In Windows, I think, these are always the same and there is one "foreground" windows. In OS X the foreground window is also the window that gets keyboard focus ("key window"), but it need not be the same as the window that is tracking the mouse. In X11 the key window need not be the foreground window and neither needs to be the window that the mouse is on.
So really, the three should be kept logically distinct.

In general, does the window request to
receive mouse events or the OS chooses which window to send mouse
input events to?

At least on OS X, the OS chooses which window to send mouse events to based on the tracking rectangle. I *think* (but should explicitly check) that if the tracking rectangle of two windows overlaps, the window getting mouse events is the top most window (the alternative being both windows get events, but I don't think that's what happens).

Evert




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