+2007-09-17 Emmanuele Bassi <ebassi@openedhand.com>
+
+ Merge from stable
+
+ * clutter/eglnative/clutter-event-egl.c:
+ Flag every device click after the first as motion events
+ instead of button presses. (#505, Shreyas Srinivasan)
+
2007-09-10 Matthew Allum <mallum@openedhand.com>
Port from stable branch.
struct ts_sample tsevent;
#endif
ClutterMainContext *clutter_context;
- static gint last_x, last_y;
+ static gint last_x = 0, last_y = 0;
+ static gboolean clicked = FALSE;
clutter_threads_enter ();
clutter_context = clutter_context_get_default ();
+
#ifdef HAVE_TSLIB
/* FIXME while would be better here but need to deal with lockups */
if ((!clutter_events_pending()) &&
event->button.modifier_state = 0;
event->button.button = 1;
- if (tsevent.pressure)
- event->button.type = event->type = CLUTTER_BUTTON_PRESS;
+ if (tsevent.pressure && !clicked)
+ {
+ event->button.type = event->type = CLUTTER_BUTTON_PRESS;
+ clicked = TRUE;
+ }
+ else if (tsevent.pressure && clicked)
+ {
+ event->motion.type = event->type = CLUTTER_MOTION;
+ }
else
- event->button.type = event->type = CLUTTER_BUTTON_RELEASE;
+ {
+ event->button.type = event->type = CLUTTER_BUTTON_RELEASE;
+ clicked = FALSE;
+ }
_clutter_event_button_generate (backend, event);