[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: PCB-gtk rotate tool bug?
On Tue, 2007-09-18 at 14:51 -0400, David Carr wrote:
> Hey Guys,
>
> Try this:
> Open PCB and add a component to the layout
> Rotate this component several times using the rotate tool (do a couple
> revolutions)
>
> If I click a fairly rapid pace (say 2-3Hz) I find that about 50% of the
> time the component rotates 180 degrees instead of 90. I usually run into
> this while spining something 270 --- the first click gives me 90, the
> second 180 and then the third skips 270 and goes right back to 0.
>
> It seems to me that this is a long standing bug in the GTK HID or that I
> don't understand some small PCB feature (perhaps related to double
> clicks?).
> My suspicion is that this in an event bug of some kind where the click
> event is delivered or processed twice.
Without having read the code... this might be possible.
Gtk will send a single click event, followed by a second event for the double-click:
>From http://library.gnome.org/devel/gtk-faq/stable/x545.html
gint
signal_handler_event(GtkWidget *widget, GdkEventButton *event, gpointer func_data)
{
if (GTK_IS_BUTTON(widget) &&
(event->type==GDK_2BUTTON_PRESS ||
event->type==GDK_3BUTTON_PRESS) ) {
printf("I feel %s clicked with button %d\n",
event->type==GDK_2BUTTON_PRESS ? "double" : "triple",
event->button);
}
return FALSE;
}
I'll see about rejecting those extra events - should be an easy fix.
Peter
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev