Commit Graph

7896 Commits

Author SHA1 Message Date
Emmanuele Bassi
0fca11ec2f path: Avoid integer overflow in get_distance()
The get_distance() API uses machine integers to compute the distance;
this means that on 32bit we can overflow the integer size. This gets
hidden by the fact that get_distance() returns an unsigned integer as
well.

In reality, ClutterPath is an unmitigated mess, and the only way to
actually fix it is to break API.

https://bugzilla.gnome.org/show_bug.cgi?id=652521
2012-04-27 12:28:49 +01:00
Alejandro Piñeiro
9428aaa3cb a11y: stop to use text as the default accessible-name for ClutterText
https://bugzilla.gnome.org/show_bug.cgi?id=672994
2012-04-26 20:01:28 +02:00
Emmanuele Bassi
3cf2bfa3b6 media: Define CLUTTER_DISABLE_DEPRECATION_WARNINGS
We know we're building deprecated API.
2012-04-26 16:59:08 +01:00
Emmanuele Bassi
56b7a4985b macros: Define MIN_REQUIRED as the current version
Otherwise we'll not warn on deprecations introduced in the current
development cycle.
2012-04-26 16:58:23 +01:00
Emmanuele Bassi
14572f4db0 actor: Call show() on set parent conditionally
This commit adds a further conditional check for calling
clutter_actor_show() when adding a child to an actor. We cannot
unconditionally change the value of the show-on-set-parent property like
the original solution of commit 81b19a78f5
as that breaks the document invariant that show-on-set-parent will be
changed iff an actor is without a parent.

The new ADD_CHILD_SHOW_ON_SET_PARENT flag is part of the default and
legacy flags, thus retaining the default behaviour when adding a child;
the flag is not passed when reordering the list of children, which means
we ignore the state of the show-on-set-parent property.

The conformance test suite fully passes, including the newly added test
to verify that changing the paint order does not trigger visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-26 14:06:00 +01:00
Emmanuele Bassi
a2f54c59f5 Revert "actor: Unconditionally set show_on_set_parent"
This reverts commit 81b19a78f5.

The commit breaks the conformance test unit for the invariants we
guarantee for the 1.x API:

ERROR:actor-invariants.c:307:actor_show_on_set_parent: assertion failed: (show_on_set_parent)
2012-04-26 14:02:07 +01:00
Emmanuele Bassi
854c246a2b docs: Add the 1.12 symbols index to the API reference 2012-04-26 13:58:06 +01:00
Emmanuele Bassi
26d8ad7479 Be resilient in case there is no device manager
It's possible to run Clutter with the 'null' input backend, which means
that clutter_device_manager_get_default() may return NULL. In the future
we may add a default dummy device manager, but right now it's safer to
just add a simple NULL check in the places where we ask for the device
manager.
2012-04-26 13:56:00 +01:00
Neil Roberts
f7f8179898 Remove calls to cogl_disable_fog
I can't think of any reason why it would do this and there's no
comment explaining it so let's just remove it. The global fog state
has been removed in Cogl 2.0 so it will cause problems later.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-04-25 17:30:17 +01:00
Neil Roberts
107f43a838 clutter-stage-cogl: Use CoglPrimitive for the debug redraw code
CoglVertexBuffer is deprecated so here is a fairly simple replacement
to use the experimental CoglPrimitive API.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-04-25 17:30:17 +01:00
Cosimo Cecchi
032870dccc device-manager: select/unselect device events as device change
When a device is added or changes, select/unselect events from X
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-24 18:49:42 -04:00
Cosimo Cecchi
b746044415 device-manager: don't select events for disabled devices
I.e. only select events for core devices or devices explicitly enabled
by clients.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-24 18:49:41 -04:00
Jasper St. Pierre
85323f09a5 conform: Make sure that raising/lowering children doesn't change state
Namely, visibility and show-on-set-parent.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-24 11:25:42 -04:00
Jasper St. Pierre
81b19a78f5 actor: Unconditionally set show_on_set_parent
Otherwise, doing something like adjusting the child's position
on a hidden actor will re-show it, which is not what we want.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-24 11:25:42 -04:00
Jasper St. Pierre
0287dc26ad actor: Not-actors don't have metas 2012-04-24 11:25:42 -04:00
Emmanuele Bassi
340775d09b cally: Fix the pkg-config file
Drop a bunch of variables that are not meant to be used by Cally; also,
drop the wrong library name from the Libs key: Clutter has a single
shared library, now.

https://bugzilla.gnome.org/show_bug.cgi?id=674105
2012-04-21 13:46:00 +01:00
Cosimo Cecchi
d61515322a x11/device-manager-xi2: Flip deltas around
Up/down is Y.
2012-04-20 18:33:16 +01:00
Piotr Drąg
7641a1ffe9 Updated POTFILES.in 2012-04-17 19:52:47 +02:00
Emmanuele Bassi
2a1dcf4008 Deprecate ClutterMedia
The interface looked like a good idea around the time Clutter 0.2 was
out, but in reality we never had a proper, and supported implementation
outside of clutter-gst - thus, ClutterMedia was acting like a wrapper
around GStreamer, leading to hilarious issues of impedence mismatch
between API and all sorts of indirection issues typical of wrong
abstractions.

In theory, ClutterMedia should have been deprecated and removed before
we hit 1.0, but we kept flip-flopping on the issue.

For 2.0, it's time to take it out.

And shoot it in the face.
2012-04-17 18:10:39 +01:00
Jasper St. Pierre
164c6ee741 text: Bubble up a click and quit early for just static text
Static text shouldn't need a cursor position or anything like that,
and it always eats a button press event.

https://bugzilla.gnome.org/show_bug.cgi?id=673190
2012-04-13 14:34:46 -04:00
Christian Kirbach
2a12747ae3 [l10n] Updated German translation 2012-04-13 19:46:47 +02:00
Emmanuele Bassi
7fffb7290e actor: Return a valid paint volume by default
It's been a year and change, and two stable releases, since we
introduced the paint volume mechanism to allow actors to paint outside
their allocation safely in environments that support clipped redraws.

The time has come to flip the switch, and return a valid paint volume,
matching the actor's allocation, by default - at least for Actor
instances from classes that do not override paint() and
get_paint_volume().

If an actor has a paint signal handler then it's the user responsability
not to paint outside the allocation - and to suffer the consequences of
doing so; in an ideal world, paint() would not be a signal in the first
place anyway. Plus, the idea that painting can happen at any time and
still have a valid surface greatly conflicts with the design goal of
making Clutter's rendering operations fully retained into a render tree.

We can still revert this commit before spinning 1.12, if need be.
2012-04-12 17:50:43 +01:00
Emmanuele Bassi
0bf5008159 interactive/snap-constaint: Modernize code 2012-04-12 17:08:33 +01:00
Emmanuele Bassi
119a25269e actor: Check for mapped children in the default get_paint_volume()
Unmapped children won't be painted so they should not contribute to the
default paint volume computation.
2012-04-12 17:07:06 +01:00
Emmanuele Bassi
98c9dad42f actor: Clear MetaGroups when empty
When removing the last Action, Constraint, or Effect, we should also be
clearing the corresponding MetaGroup: code inside ClutterActor relies on
NULL checks, and changing them all to check for NULL && n_items == 0
would not be fun.
2012-04-12 17:04:57 +01:00
Peter Hutterer
a66fbd258e Rename XINPUT_2_2 define to HAVE_XINPUT_2_2
configure.ac defines XINPUT_2_2 if XI 2.2 support was found. The code
expects XINPUT_2_2 in the device manager, but HAVE_XINPUT_2_2 in the x11
backend.

On newer X servers, the latter causes a BadValue when XIQueryDevice sends a
different major/minor than gdk's device manager (gnome-control-center).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=673961
2012-04-12 11:31:29 +01:00
Emmanuele Bassi
14b9cb4f7b actor: Fix completed transitions logic
We need to remove the transition only if the current repeat is equal to
the number of repeats, and if the transition was marked as remove on
complete. Otherwise, the transition has to remain where it is.
2012-04-11 13:57:06 +01:00
Rob Bradford
2d48e6e3e4 build: Bump pango dependency to 1.30
Clutter now uses pango_layout_get_character_count() which was added in 1.30.
2012-04-11 11:56:11 +01:00
Carles Ferrando
656d5c31e3 [l10n]Updated Catalan (Valencian) translation 2012-04-10 20:56:50 +02:00
Jordi Serratosa
331488fe86 [l10n] Fixes on Catalan translation 2012-04-10 20:56:46 +02:00
Emmanuele Bassi
ab486bfe70 actor: Remove unnecessary relayout/redraw calls
They will be handled internally.
2012-04-10 13:37:04 +01:00
Emmanuele Bassi
de9112bc8c actor: Do not queue_redraw() in set_opacity()
The opacity internal setter will do it for us, and it will take into
consideration any eventual flatten effect applied to the actor.

This unbreaks the actor-offscreen-redirect conformance test.
2012-04-10 12:59:16 +01:00
Emmanuele Bassi
25bf0b72f6 x11/stage: Leave a comment about multi-head setup
The get_geometry() implementation is broken on multi-head systems; the
only solution is to use XRandR to get the size of the CRTC that contains
the stage.
2012-04-10 12:34:54 +01:00
Emmanuele Bassi
b12514ff9a stage: Unset the natural size when fullscreening
This ensures that constraints and signal handlers will go through the
allocation and not through the cache after ::fullscreen has been
emitted.
2012-04-10 12:12:50 +01:00
Emmanuele Bassi
612b714149 interactive/stage-sizing: Clean up 2012-04-10 12:12:28 +01:00
Emmanuele Bassi
f6da5ea616 x11/device-manager-xi2: Add 'Abs Distance' axis
In XInput 2, the proximity events of XInput 1 have been replaced by an
axis on a valuator class. This means that, on devices that support
proximity information, for instance pens of a tablet, you will start
receiving events with the distance as an axis value - similarly to how
the pressure and tilt are presented in the API.
2012-04-10 09:32:00 +01:00
Emmanuele Bassi
c699972bfa enums: Add CLUTTER_INPUT_AXIS_DISTANCE 2012-04-10 09:32:00 +01:00
Owen W. Taylor
bdf4b3a33a ClutterText: Fix length passed to clutter_text_buffer_set_text()
clutter_text_buffer_set_text() expects a char count, not a byte
count, so pass -1 rather than using strlen.

https://bugzilla.gnome.org/show_bug.cgi?id=673783
2012-04-09 16:11:49 -04:00
Emmanuele Bassi
86a5213473 x11/device-manager-xi2: Remove heuristics for touchscreen devices
Devices that have touch valuator classes will be touchscreens or
touchpads; anything else should be ignored.
2012-04-07 23:07:59 +01:00
Emmanuele Bassi
532904e43d osx: Fix build 2012-04-04 15:33:32 +01:00
Emmanuele Bassi
ea68ccf703 build: Remove -Waggregate-returns 2012-04-04 15:33:05 +01:00
Daniel Nylander
cc43536b3c Updated Swedish translation 2012-04-01 20:31:08 +02:00
Emmanuele Bassi
d45420f992 actor: Make _clutter_actor_foreach_child() safe again
We were using g_list_foreach() prior to the first Apocalypse, and that
function is resilient against changes to the list while iterating it;
since we are not using a GList any more, we need handle this case
ourselves.
2012-03-29 15:52:51 +01:00
Emmanuele Bassi
656c641d31 interactive/bin-layout: Call save/restore easing state
Don't do unprotected calls to set_easing_mode() and
set_easing_duration().
2012-03-29 15:12:09 +01:00
Emmanuele Bassi
499534f3ac actor: Make :content-gravity animatable
Let's start making some non-trivial property animatable, like the
content gravity.
2012-03-29 15:11:52 +01:00
Stefano Facchini
2c46baf30c canvas: avoid emission of "draw" signal when the size is zero
This also avoids the warning

  Cogl-WARNING **: ./cogl-buffer.c:215: GL error (1285): Out of memory

generated by cogl_buffer_map when the CoglBuffer has zero length.
2012-03-29 15:14:29 +02:00
Emmanuele Bassi
97dcfe5bf1 actor: Ensure that we correctly remove transitions
The check on :remove-on-complete was inverted, but we also need to check
that the current repeat of the timeline is also the last.
2012-03-29 12:01:03 +01:00
Emmanuele Bassi
ff9a503c14 actor: Minor optimization to avoid get_preferred_*
When the easing state has a duration of zero milliseconds we can skip
the entire create_transition() call inside set_width() and set_height(),
to avoid what may be a costly call to get_preferred_*.
2012-03-28 18:07:06 +01:00
Emmanuele Bassi
cede56dcdd actor: Ensure we use the current easing duration and mode
When updating a transition in flight, if the current easing state does
not match the transition's.
2012-03-28 16:39:30 +01:00
Emmanuele Bassi
824dfcc67e docs: Mention in-flight value changes 2012-03-28 13:21:58 +01:00