The ordering of the evdev button numbers is the opposite of the
order in Clutter (the middle button is 3 instead of 2) so we need to
manually map the button numbers when creating a ClutterButtonEvent.
https://bugzilla.gnome.org/show_bug.cgi?id=680255
803b3bafb6 introduced a new issue for
multi touch events.
In the case where 2 touch events for 2 different touch points are
processed in the same iteration, a call to
_clutter_stage_remove_device() when processing the first event will
remove the stage setting of the InputDevice. That means Clutter will
skip the second event, because it can't find a stage to which relate
the event, so no related actor and so no emission.
To fix this we move the _clutter_stage_(add/remove)_device() calls
into the input device. This way the input device can find out exactly
when to call these functions (i.e. when no touch point were previously
active or when no touch point remain active).
https://bugzilla.gnome.org/show_bug.cgi?id=682362
Interpolating between two transformations expressed using a 3D matrix
can be achieved by decomposing the matrices into their transformations
and do a simple numeric interpolation between the initial and final
states, like we do for other data types.
Luckily for us, the CSS Transforms specification from the W3C provides
the decomposition algorithm, using the "unmatrix" code taken from the
book "Graphics Gems II, edited by Jim Arvo".
Once the matrices have been decomposed, we can simply interpolate the
transformations, and re-apply them onto the result matrix, using the
facilities that Clutter provides for interpolating between two known
GTypes.
Since Cogl version 1.11.2, Cogl no longer includes the EGL headers
from cogl.h if COGL_ENABLE_EXPERIMENTAL_2_0_API is defined. Instead
the application needs to include cogl-egl.h so that we can avoid
polluting the global namespace with X defines. Clutter defines the 2.0
define in its configure.ac and it is relying on Cogl to include the
right EGL header in clutter-egl-headers.h so we need to change which
header it includes.
When changing an implicit transition mid flight we may end up with an
easing state with a duration of zero milliseconds; this leads to the
implicit transition machinery setting the final state directly onto the
actor. If there is a running transition, though, we need to remove it
from the transitions table, otherwise it will keep running.
This regression happened when the update_transition() internal function
was merged into the create_transition() one.
Tested-by: Lionel Landwerlin <llandwerlin@gmail.com>
PanAction is a GestureAction-subclass that implements the panning
concept for scrollable actors, with the ability to emit interpolated
signals to emulate the kinetic inertia of the panning. PanAction provides:
• pan signal, notifying users of the panning gesture status;
• pan-stopped signal, emitted at the end of the interpolated phase
of the panning gesture, if enabled;
• pan-axis property, to allow constraining the dragging to a specific
axis;
• interpolated property, to enable or disable the inertial behaviour;
• deceleration property, to customize the rate at which the momentum
of the panning will be slowed down;
• acceleration-factor property, applied to the inertial momentum when
starting the interpolated sequence.
An interactive test is also provided.
https://bugzilla.gnome.org/show_bug.cgi?id=681648
Add some accessors to simplify common tasks for GestureAction users:
• clutter_gesture_action_get_motion_delta() to get the delta
on the X and Y axis in stage coordinates since the last motion
event, and the scalar distance travelled;
• clutter_gesture_action_get_velocity() to get an estimate of the
speed of the last motion event along the X and Y axis and as a
scalar value in pixels per millisecond.
https://bugzilla.gnome.org/show_bug.cgi?id=681648
When appending (with a negative row/column parameter), the row/column
count should be incremented by 1, not 2. This also fixes layout errors
when using column/row spacing: The amount of extra space required was
calculated incorrectly due to the wrong column count.
https://bugzilla.gnome.org/show_bug.cgi?id=679990
When setting a drag handle, transform the original press
coordinates using the drag handle as reference instead of the
associated actor.
This causes the initial misplacement of drag handle in
example/drag-action when holding down the Shift key: the handle
gets placed at the main actor origin on the first drag event,
instead of following the mouse pointer.
All subsequent motion events already use the right actor when
transforming the coordinates, thus they are not affected.
https://bugzilla.gnome.org/show_bug.cgi?id=681746
The C4819 warnings appear due to a bug on Visual C++ when running on
non-English locales, specifically CJK versions/locales of Windows.
Re-enable this, like what is done in GLib, and add a note in the
Visual C++ README.txt's to tell people about this, so that Cogl will be
built correctly.
If the DragAction has a drag handle that gets destroyed inside the
::drag-end signal handler, the destruction sequence will trigger a
callback we have in place to check if the handle is being destroyed
mid-drag, e.g. from a ::drag-motion event.
The callback on the drag handle destruction will check if we are still
in the middle of a drag and emit the ::drag-end signal to allow cleaning
up; the callback erroneously uses the drag handle as the argument for
the emit_drag_end() function — instead of the actor to which the drag
action has been attached. Also, by the time we emit the ::drag-end, we
are not dragging the actor any more, so we shouldn't be emitted the
::drag-end signal twice.
The fix is, thus, made of two parts:
- reset the in_drag boolean before emitting the ::drag-end signal
so that destroying the drag handle will not result in a double
signal emission;
- use the correct actor when calling emit_drag_end().
https://bugzilla.gnome.org/show_bug.cgi?id=681814