[9936] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: problem with button_press_events
daemon@ATHENA.MIT.EDU (Owen Taylor)
Fri Nov 6 16:58:07 1998
To: Adrian Feiguin <adrian@ifir.ifir.edu.ar>
Cc: gtk-list@redhat.com
From: Owen Taylor <otaylor@redhat.com>
Date: 06 Nov 1998 16:56:18 -0500
In-Reply-To: Adrian Feiguin's message of "Fri, 6 Nov 1998 21:34:29 +0300 (GMT-3)"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Adrian Feiguin <adrian@ifir.ifir.edu.ar> writes:
> I'm developing gtksheet and Steven Rostedt found a little but ougly bug.
> When you click your mouse rapidly you get multiple calls to
> button_press_event but none to button_release_event. I think that the
> widget is recieving a double click event, but I'd like to avoid this
> because it causes serious problems.
> The event_mask is defined as follows:
>
> attributes.event_mask |= (GDK_EXPOSURE_MASK |
> GDK_BUTTON_PRESS_MASK |
> GDK_BUTTON_RELEASE_MASK |
> GDK_KEY_PRESS_MASK |
> GDK_POINTER_MOTION_MASK |
> GDK_POINTER_MOTION_HINT_MASK);
Check, and I think you'll find you get exactly one event
with:
event->type == GDK_BUTTON_PRESS
for each event event with event->type == GDK_BUTTON_RELEASE.
You are just getting more events with type
GDK_2BUTTON_PRESS, and GDK_3BUTTON_PRESS.
(For a double click, gdk sends:
GDK_BUTTON_PRESS
GDK_BUTTON_RELEASE
GDK_BUTTON_PRESS
GDK_2BUTTON_PRESS
GDK_BUTTON_RELEASE)
Regards,
Owen
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null