TIP:            84
Title:          Add control for mouse movement filtering
Version:        $Revision: 1.5 $
Author:         Jyrki Alakuijala <Jyrki.Alakuijala@iki.fi>
Author:         Jeff Hobbs <JeffH@ActiveState.com>
State:          Final
Type:           Project
Vote:           Done
Created:        26-Feb-2002
Post-History:   
Tcl-Version:    8.4

~ Abstract

When the mouse is moved, the Tcl/Tk system eats most of the mouse
movement events and only the last movement event when Tcl/Tk is not
busy is stored in the event queue.  I would like to obtain all the
movement events from the X-server or the Windows UI.

~ Rationale

I have an artistic drawing program where I need to track mouse as
accurately as possible.  At the moment I poll the ''XQueryPointer()''
in the busy loops to create (pseudo)events in the C-side of the code
to compensate for the missing events, but (of course) this does not
work in Windows.

I would like to have an option for the widget system or for the window
control so that a window (or, alternatively all the windows) could
receive all the movement events instead of only the last buffered one.

This has been a problem for me since 1995 and has - at many times -
caused me to consider changing the widget system.

~ Implementation

|    int Tk_CollapseMotionEvents(Display *display, int collapse)

A reference implementation is SF Tk patch 564642, which adds a flag to the TkDisplay that specifies whether motions events should be collapsed or not.  The default is the current behavior of collapsing these events.

~ Copyright

This document has been placed in the public domain.

