+ button = 3;
+ }
+
+ // check for a double click
+ //
+ long dclickTime = XtGetMultiClickTime((Display*) wxGetDisplay());
+ long ts = wxevent.GetTimestamp();
+
+ int buttonLast = win->GetLastClickedButton();
+ long lastTS = win->GetLastClickTime();
+ if ( buttonLast && buttonLast == button && (ts - lastTS) < dclickTime )
+ {
+ // I have a dclick
+ win->SetLastClick(0, ts);
+ switch ( eventType )
+ {
+ case wxEVT_LEFT_DOWN:
+ eventType = wxEVT_LEFT_DCLICK;
+ break;
+ case wxEVT_MIDDLE_DOWN:
+ eventType = wxEVT_MIDDLE_DCLICK;
+ break;
+ case wxEVT_RIGHT_DOWN:
+ eventType = wxEVT_RIGHT_DCLICK;
+ break;
+
+ default :
+ break;
+ }
+
+ }
+ else
+ {
+ // not fast enough or different button
+ win->SetLastClick(button, ts);