Re: Request for comments on UI change (resend)



>  Yes, if event->type == GTK_BUTTON_PRESS is a single click;  if
>  event->type is GDK_2BUTTON_PRESS you got a double click.

This is not entirely accurate.  The sequence of events for a double click is

	GDK_BUTTON_PRESS
	GDK_BUTTON_RELEASE
	GDK_BUTTON_PRESS
	GDK_2BUTTON_PRESS
	GDK_BUTTON_RELEASE

So either you make your action on GDK_BUTTON_PRESS be idempotent, or
you use the events' timestamps to distinguish between single and
double clicks.

  Federico



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