LeftIsDown() on wxEVT_LEFT_DOWN event?

Alex Bligh alex at alex.org.uk
Tue Aug 15 08:46:17 PDT 2006



--On 15 August 2006 17:42 +0200 Vadim Zeitlin <vadim at wxwindows.org> wrote:

>  It might be the wrong function to use then. I wonder if we can retrieve
> the information we need from the GdkEventXXX itself? E.g. for
> GdkEventCrossing (used for enter/leave events generation) we already have
> x, y and state fields in the event itself, could we use them instead?

It's a while since I looked at it (but I'll have to again) but my initial
analysis was that it was going to great trouble to get the X and Y
positions from the event, translate, and preserve them, then carefully
overwrote them with the real-time version (that's on the wxMouseEvent
stuff).

I am undecided in whether there is any /particular/ harm in wxGetMouseState
itself looking for the synchronous mouse position, though arguably it would
be faster it if looked for the async mouse position (i.e. is the bug in the
MouseEvent generation, or in all calls to gdk_window_get_pointer).

Alex




More information about the wx-users mailing list