Mouse double-click filtering



Hi,
Is there a standard way for handling a mouse double-click event?
The problem is that when a double-click happens, it generates a
single-click event (GDK_BUTTON_PRESS) followed by a double-click
event (GDK_2BUTTON_PRESS):

1. GDK_BUTTON_PRESS
2. GDK_BUTTON_RELEASE
3. GDK_BUTTON_PRESS
4. GDK_2BUTTON_PRESS
5. GDK_BUTTON_RELEASE

This falsely triggers the usual callbacks for single-clicks.

I could make a polled function that is called every 20ms that
logs button-press events and then emits a single-click or double-click
signal depending on a user defined click-speed interval, but it all
seems a bit re-inventing the wheel.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]