drag-action: don't mix touch and pointer events

https://bugzilla.gnome.org/show_bug.cgi?id=709762
(cherry picked from commit ccd2d4c0a7a789e3aea410f9fafd494949fb0c87)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
table-layout: Fix size request when there are no visible rows/cols

The calculation (n - 1) * spacing to compute the total spacing is
only correct for n >= 1 - if there are no visible rows/cols, the
required spacing is 0 rather than negative.

https://bugzilla.gnome.org/show_bug.cgi?id=709434
(cherry picked from commit 44b1a808c8a74fd3b97367f4819fabcc46a1eb23)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
table-layout: Base space calculations on visible children

This is what we already do in the actual size requests, it makes
sense to do the same in the space calculations.

https://bugzilla.gnome.org/show_bug.cgi?id=709434
(cherry picked from commit 3435d017e27755353123ca8f65bfe3c051102b48)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
drag-action: fix warning when setting drag-handle to null

https://bugzilla.gnome.org/show_bug.cgi?id=708850
(cherry picked from commit 067fcc3690b0a354bf0a7b0692aab47fb68a0817)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
device: Guard against divisions by zero

The range of a device could be 0, so we need to bail out from the
scaling during the axis translation.

https://bugzilla.gnome.org/show_bug.cgi?id=707033
(cherry picked from commit fb8eacfb0256a211ca79366945c8f4eb4962be4e)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
text: Consider text direction when computing layout offsets

Currently this is only the case when the actor's x-expand/x-align
flags have been set and clutter_text_compute_layout_offsets() is
used.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
(cherry picked from commit 986e46dc6677a708cd3db8abaf28f09cd2007c4b)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
click-action: disconnect signals and gsources on dispose

https://bugzilla.gnome.org/show_bug.cgi?id=707774
(cherry picked from commit 5c035f2107cda24a074246d6b083296da2526c07)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
box-layout: Fix floating point truncation when calculating a child's size

The child size is a float, not an int.

https://bugzilla.gnome.org/show_bug.cgi?id=707808
(cherry picked from commit ac70bd3503ee7adc9bf6938353e25e81e852bfaf)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
box-layout: Fix RTL layout swapping with non-zero container offsets

https://bugzilla.gnome.org/show_bug.cgi?id=706450
(cherry picked from commit 05f56affe19468e1e54281230cd23333f94cfebb)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
table-layout: Fix default values for expand/fill child properties

Currently the default values according to their param spec don't
match the actually used defaults, so update the former to reflect
the actual behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=703809
(cherry picked from commit c14bd84eefd53c9df891e4d031455fbf75dbb4c3)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
box-layout: Fix (legacy) expand/fill properties

Whether a child should receive extra space should be determined
by the expand property, not [xy]_fill (which just determine how
additional space should be used). The behavior is already correct
when using the ClutterActor:[xy]_expand properties, but needs
fixing for the corresponding ClutterBoxLayoutChild property.

https://bugzilla.gnome.org/show_bug.cgi?id=703809
(cherry picked from commit 8e850ff3e4f02d37ec7ecc272eea540ffd29dbcf)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
bin-layout: Fix offsets

Just as BoxLayout, BinLayout uses an odd interpretation of the box
passed into allocate(): to define a child area of (w x h) starting at
(x, y), callers need to pass a box of (x, 2 * x + w, y, 2 * y + h).
This behavior is just confusing, change it to use the full box for
child allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=703809
(cherry picked from commit 40a1903db6dd80445275b3f73a53fd7b7df47017)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
box-layout: Fix child offsets

Currently, BoxLayout interprets the box passed into allocate() in
a fairly peculiar way:
 - in the direction of the box, all space between [xy]1 and [xy]2
   is distributed among children (e.g. children occupy the entire
   width/height of the box, offset by [xy]1)
 - in the opposite direction, expanded children receive space
   between [xy]1 and the height/width of the box (e.g. children
   occupy the width/height of the box minus [xy]1, offset by [xy]1)
The second behavior doesn't make much sense, so adjust it to interpret
the box parameter in the same way as the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=703809
(cherry picked from commit 5dd2dcf14ff4676ac4d84ef567d1bca1faaaab7a)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
actor: Minor cleanup

In clutter_allocate_align_fill(), x2/y2 may be set twice for no
particular reason; save a couple of lines by not doing this.

https://bugzilla.gnome.org/show_bug.cgi?id=703809
(cherry picked from commit 5bab9a8655346290f7ee0e4af972e3d085a6b818)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
docs: Use the correct signal name

ClutterTransition:remove-on-complete uses the ClutterTimeline::stopped
signal, as it's the signal that tells us that the timeline's duration
has fully elapsed.

(cherry picked from commit edf00747ef3bb955ad48a2191cdec33524156298)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
actor: Do not set remove-on-complete on implicit transitions

The implicitly created transitions are removed when complete by the
implicit transition machinery. The remove-on-complete hint is for
user-provided transitions.

https://bugzilla.gnome.org/show_bug.cgi?id=705739
(cherry picked from commit b50e1c3b628c0238da0d1ea89853b53ef06fa2ef)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
clutter-text: prevent text buffer creation if not needed

When allocating or asking for preferred width/height on a ClutterText,
it can notify a change on buffer/text/max-length if no text has been
set.

https://bugzilla.gnome.org/show_bug.cgi?id=703882
(cherry picked from commit eed94960562693e489354afb2a78a355301515fa)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
paint-nodes: Use the correct wrap mode for TextureNode

If we allow content repeats on the texture nodes, then we need to use
the "automatic" wrap mode for the texture layer in the pipeline, instead
of the clamp-to-edge one.

Reported-by: Matthew Watson <matthew@endlessm.com>
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
(cherry picked from commit 5b614cda1cd6032d7a0b1d9823219bc336086246)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
conform: Disable texture-fbo unit

It's a pretty pointless test, which got dropped in newer releases of
Clutter.
Release Clutter 1.14.6 (stable)