mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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)
This commit is contained in:
parent
f5483054fc
commit
c7ff2b7651
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2007-09-10 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
Port from stable branch.
|
Port from stable branch.
|
||||||
|
@ -191,11 +191,13 @@ clutter_event_dispatch (GSource *source,
|
|||||||
struct ts_sample tsevent;
|
struct ts_sample tsevent;
|
||||||
#endif
|
#endif
|
||||||
ClutterMainContext *clutter_context;
|
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_threads_enter ();
|
||||||
|
|
||||||
clutter_context = clutter_context_get_default ();
|
clutter_context = clutter_context_get_default ();
|
||||||
|
|
||||||
#ifdef HAVE_TSLIB
|
#ifdef HAVE_TSLIB
|
||||||
/* FIXME while would be better here but need to deal with lockups */
|
/* FIXME while would be better here but need to deal with lockups */
|
||||||
if ((!clutter_events_pending()) &&
|
if ((!clutter_events_pending()) &&
|
||||||
@ -218,10 +220,20 @@ clutter_event_dispatch (GSource *source,
|
|||||||
event->button.modifier_state = 0;
|
event->button.modifier_state = 0;
|
||||||
event->button.button = 1;
|
event->button.button = 1;
|
||||||
|
|
||||||
if (tsevent.pressure)
|
if (tsevent.pressure && !clicked)
|
||||||
event->button.type = event->type = CLUTTER_BUTTON_PRESS;
|
{
|
||||||
|
event->button.type = event->type = CLUTTER_BUTTON_PRESS;
|
||||||
|
clicked = TRUE;
|
||||||
|
}
|
||||||
|
else if (tsevent.pressure && clicked)
|
||||||
|
{
|
||||||
|
event->motion.type = event->type = CLUTTER_MOTION;
|
||||||
|
}
|
||||||
else
|
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);
|
_clutter_event_button_generate (backend, event);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user