st-button: Handle touch-cancel events
Handling those events is neccessary if a touch event that pressed down a button turns out to be a gesture. In this case the button should be released without emitting the clicked signal.
This commit is contained in:
parent
d75a3484d6
commit
99ce3deeb0
@ -262,6 +262,10 @@ st_button_touch_event (ClutterActor *actor,
|
|||||||
clutter_input_device_sequence_ungrab (device, sequence);
|
clutter_input_device_sequence_ungrab (device, sequence);
|
||||||
return CLUTTER_EVENT_STOP;
|
return CLUTTER_EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
else if (event->type == CLUTTER_TOUCH_CANCEL)
|
||||||
|
{
|
||||||
|
st_button_fake_release (button);
|
||||||
|
}
|
||||||
|
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user