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

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


On 2008-12-15, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> >
> > >Group: 4.9
> >
> > Status: Open
> > Resolution: None
> > Priority: 5
> > Private: No
> > Submitted By: Peter Wang (tjaden)
> > Assigned to: Nobody/Anonymous (nobody)
> > Summary: display field for mouse state
> >
> > Initial Comment:
> > Add display field to mouse state struct to tell which window the mouse
> > cursor is over.
> >
> > Consider deleting al_set_mouse_xy and any other function which don't work
> > well in multi-window environments.
> >

> 
> Is this meant to help with knowing which window is foreground?

I don't think so.  I'm assuming the usual (misleading) meaning, which is
the window with keyboard input focus.

The most important thing for it is to tell you which window the x,y
coordinates are relative to.  If no mouse buttons are down, this should
be the window that the cursor is currently over.  If at least one mouse
button is down, it should be the window in which the first of the mouse
buttons was pressed.

If no buttons are down and the mouse cursor is not over any of the
program's windows, the display field should probably be NULL and the x,y
coordinates relative to the root window (the entire screen).

Peter





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