Re: [AD] [ alleg-Bugs-2431768 ] display field for mouse state |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] [ alleg-Bugs-2431768 ] display field for mouse state
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Mon, 15 Dec 2008 20:14:03 -0500
On 15-Dec-08, at 6:47 PM, Peter Wang wrote:
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.
Which isn't necessarily the same one that the mouse is over either.
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?
This would correspond with how mouse cursors behave in ex_mouse_cursor.
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).
Cool, that way we can move windows around and make them dodge the
mouse. I can see a great game of "catch that window!"
Ok, maybe not. If we're going to report the position relative to the
root window, should we also report the coordinates of the upper left
and lower right coordinates of an Allegro window? Or can we already do
that?
Evert