Commit Graph

5847 Commits

Author SHA1 Message Date
Emmanuele Bassi
c2d5dd2d11 x11: Remove unused variable 2013-07-12 09:57:23 +01:00
Jasper St. Pierre
01707f0da9 input-device-x11: Remove more dead code
It seems this API has never been used..
2013-07-11 14:09:43 -04:00
Jasper St. Pierre
e62cf4745f device-manager: Select for events on XIAllMasterDevices
This removes a bit of work that we have to do for every device, and makes it
easy for mutter to patch out parts of the event mask it doesn't want.

https://bugzilla.gnome.org/show_bug.cgi?id=703969
2013-07-11 14:09:43 -04:00
Jasper St. Pierre
032688800c device-manager: Don't pass the event mask around
There's no point in doing this, as we always use a constant event mask.
Simply do what everything else does.

https://bugzilla.gnome.org/show_bug.cgi?id=703969
2013-07-11 14:09:43 -04:00
Jasper St. Pierre
e38ea7a20f x11: Remove support for XInput 1
Now we either use core X11 or XInput 2.

https://bugzilla.gnome.org/show_bug.cgi?id=703969
2013-07-11 14:03:43 -04:00
Jasper St. Pierre
0b32f99bd1 backend-x11: Remove bad branch prediction
This will only get once, at in Clutter initialization time.

https://bugzilla.gnome.org/show_bug.cgi?id=703969
2013-07-10 17:22:48 -04:00
Neil Roberts
78f20627ac wayland: Don't pass the shell and compositor down to Cogl
The Wayland 1.0 API allows orthoganal components of an application to
query the shell and compositor themselves by querying their own
wl_registry. The corresponding API in Cogl has been removed so Clutter
shouldn't call it anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=703878
2013-07-10 13:29:35 +01:00
Neil Roberts
6c66148faf Update ClutterWaylandSurface to use a resource instead of wl_buffer
The Wayland server API has changed so that wl_shm_buffer is no longer
a type of wl_buffer and wl_buffer will become an opaque type. This
changes ClutterWaylandSurface to accept resources for a wl_buffer
instead of directly taking the wl_buffer so that it can do different
things depending on whether the resource points to an SHM buffer or a
normal buffer. This matches similar changes to Cogl:

https://git.gnome.org/browse/cogl/commit/?id=9b35e1651ad0e46ed48989

https://bugzilla.gnome.org/show_bug.cgi?id=703608
2013-07-10 13:28:52 +01:00
Neil Roberts
fa8809d716 Add COGL_DISABLE_DEPRECATION_WARNINGS to the build flags
Cogl 1.16 has deprecated a lot of API which it will be difficult for
Clutter to catch up with. For the time being the warnings are just
being disabled to keep the build output clean.

https://bugzilla.gnome.org/show_bug.cgi?id=703877
2013-07-10 13:28:12 +01:00
Lionel Landwerlin
eed9496056 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
2013-07-10 11:16:09 +01:00
Emmanuele Bassi
6227f7a0f5 actor: Deprecate realize and unrealize
There is no reasonable use case for having the functions, the virtual
functions, and the signals for realization and unrealization; the
concept belongs to an older era, when we though it would have been
possible to migrate actors across different GL contexts, of in case a GL
context would not have been available until the main loop started
spinning. That is most definitely not possible today, and too much code
would utterly break if we ever supported that.
2013-07-10 11:16:09 +01:00
Rob Bradford
7df59887d7 wayland: Use a fake millisecond monotonic time source for event times
The majority of Clutter input events require a time so that that the
upper levels of abstraction can identify the ordering of events and also
work out a click count.

Although some Wayland events have microsecond timestamps not all those
that Clutter expects do have. Therefore we would need to create some
fake times for those events. Instead we always calculate our own time
using the monotonic time.

https://bugzilla.gnome.org/show_bug.cgi?id=697285
2013-07-10 10:30:17 +01:00
Rob Bradford
8df5aba361 wayland: add support for connecting to a foreign display
This allows the reuse of the display connection and hence objects with
existing code that is using Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=703566
2013-07-09 12:35:29 +01:00
Emmanuele Bassi
5b614cda1c 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>
2013-07-04 16:32:58 +01:00
Emmanuele Bassi
1f37798b4c Revert "cogl: Replace deprecated Cogl API"
This reverts commit 6dd9da05c7.

Windowing system features we need are not mapped on cogl_has_feature().

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-04 16:12:27 +01:00
Emmanuele Bassi
6dd9da05c7 cogl: Replace deprecated Cogl API 2013-07-03 18:35:55 +01:00
Emmanuele Bassi
5a061ed4a3 gdk: Replace deprecated Cogl API 2013-07-03 18:35:44 +01:00
Emmanuele Bassi
dc7d42d87a x11: Replace deprecated Cogl API 2013-07-03 18:24:27 +01:00
Emmanuele Bassi
5cc7a1ee57 deprecated: Disable Cogl deprecation warnings
Like we do for Clutter: we know we are using deprecated API.
2013-07-03 18:15:31 +01:00
Emmanuele Bassi
bb45f17979 deprecated: Use the new macros for instance private data 2013-07-03 18:12:47 +01:00
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Emmanuele Bassi
8532ca2104 cally: Use the new macros for adding private data 2013-07-03 14:02:09 +01:00
Emmanuele Bassi
2e905dd9d4 Fix annotations for signal arguments
The introspection scanner started warning about mismatched arguments
number.
2013-07-03 13:13:41 +01:00
Rob Bradford
e352047499 wayland: make the surface toplevel when showing the stage
Cogl (as of 0b2b46ce) now only sets the shell surface as toplevel when
the CoglOnscreen is shown.

Without calling wl_shell_surface_set_toplevel the compositor will not
know what role to give to the compositor and thus the stage will not
appear.

When we look to support multiple roles / foreign surfaces we will need
to revisit this call and ensure we only call it when we are working in
the default case.

https://bugzilla.gnome.org/show_bug.cgi?id=703188
2013-07-02 16:01:55 +01:00
Rob Bradford
5758ab5c89 wayland: Do not poll the Wayland socket for events
Since Cogl also polls on this file descriptor we can get into situations
where our event source is woken up to handle events but those events
have instead been handled by Cogl resulting in the source sitting in
poll().

We can safely rely on Cogl to handle the polling on the event source and
to dispatch those events.

https://bugzilla.gnome.org/show_bug.cgi?id=702202
2013-06-28 11:43:49 +01:00
Adel Gadllah
180e7d74f3 clutter-offscreen-effect: Allocate the cogl texture directly
Cogl now lazy loads the textures so we cannot rely on getting NULL
from cogl_texture_new_with_size so we have to allocate it by ourselves.

https://bugzilla.redhat.com/show_bug.cgi?id=975171
2013-06-25 20:29:20 +02:00
Cosimo Cecchi
4d8d5a62f3 text: relayout on cursor visibility change
When the cursor visibility changes, we have to relayout the ClutterText
actor instead of just redrawing it - as the cursor changes the
PangoLayout size, a size request cycle is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=702610
2013-06-20 10:05:02 -07:00
Emmanuele Bassi
18f7a4aa12 actor: Remove the was_painted flag
While we still don't want to perform implicit transitions on unmapped
actors, we can relax the requirement on having been painted once; the
was_painted flag was introduced to avoid performing implicit transitions
on the :allocation property, but for that we can use the
needs_allocation flag instead, as needs_allocation will be set to FALSE
when we have been painted as well.

Thus, we retain our original goal of not having actors "flying" into
position on their first allocation, without the side effect of
preventing animations when emitting the ::show signal.
2013-06-15 11:54:18 +01:00
Lionel Landwerlin
fa933b5ec5 clutter-text: prevent reset of user set font descriptions on dpi changes
When setting the font using clutter_text_set_font_description(), the
font settings on a ClutterText actor can be reset when there is a dpi
changes signaled by the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=702016
2013-06-12 13:47:09 +01:00
Sjoerd Simons
3bcee2b122 gesture-action: begin gesture as soon as the number of touchpoints is reached
1ddef9576d87c98fafbcefe3108f04866630c2cd had its logic the
wrong way round, a gesture should begin as soon as the requested number
of touchpoints is reached. Correcting this fixes tap events

https://bugzilla.gnome.org/show_bug.cgi?id=700980
2013-06-12 11:19:08 +01:00
Samuel Degrande
76fb468319 deform-effect: Set cull-face mode on the correct pipeline
Fix a function call to set the cull-face mode of the back_pipeline:
the function was called on the 'front-pipeline' instead of the
back-pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=701208
2013-06-12 10:41:57 +01:00
Craig R. Hughes
e54246dd69 Extra ref leak in clutter_actor_set_child_at_index too
https://bugzilla.gnome.org/show_bug.cgi?id=696813
2013-06-12 10:14:26 +01:00
Craig R. Hughes
90f68edbda clutter_actor_set_child_above/below_sibling leaking a reference
https://bugzilla.gnome.org/show_bug.cgi?id=696813
2013-06-12 10:14:25 +01:00
Emmanuele Bassi
cbf0199804 actor: Fix has_constraints() and has_actions()
When we changed the MetaGroup to handle internal effects, we updated
has_effects(), but forgot to fix the equivalent has_constrains() and
has_actions() method.

Now, if we clear the constraints or the actions on an actor, and we
call has_constraints() or has_actions(), we get an false positive.
2013-06-12 10:04:32 +01:00
Emmanuele Bassi
e1fe999db0 stage: Ensure that we don't pick during destruction
When destroying a ClutterStage we should just skip picking operations,
to avoid calling into a state that is being torn down.
2013-06-12 10:04:31 +01:00
Matthias Clasen
d343cc6289 x11: trap errors when calling XIQueryDevice
Devices can disappear at any time, causing XIQueryDevice
to throw an error. At the same time, plug a memory leak.

https://bugzilla.gnome.org/show_bug.cgi?id=701974
2013-06-10 21:45:47 -04:00
Emmanuele Bassi
0065fb459c Revert "units: Handle negative values in clutter_units_from_string()"
Stray commit got pushed too soon.

This reverts commit 44f283bb72.
2013-05-22 14:34:22 +01:00
Bastian Winkler
44f283bb72 units: Handle negative values in clutter_units_from_string()
In order to allow values like "-2cm" in ClutterScript,
clutter_units_from_string() needs to handle negative values as well.
2013-05-22 15:26:12 +02:00
Emmanuele Bassi
19391a9626 cally: Use a weak pointer to hold the key focus in CallyStage
We want to avoid the pointer getting stale, and causing crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=692706
2013-05-17 15:27:51 +01:00
Emmanuele Bassi
755f41f559 canvas: Remove invalidate_with_size()
We can replace it by adding a return value to set_size() that can tell
us if the set_size() invalidated the contents of the canvas or not.
2013-05-15 20:08:02 +01:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Lionel Landwerlin
9c6f3793e8 offscreen-effect: limit offscreen fbo size to the stage's size
When using a ClutterOffscreenEffect, the size of the offscreen buffer
allocated to perform the effect is currently computed using the paint
volume of the actor it's attached to and in the case the paint volume
cannot be computed, the effect falls back to using the stage's size.

If you scale an actor enough so its paint volume is much bigger that
the size of the stage, you can end up running out of memory (which
leads to your application crashing).

https://bugzilla.gnome.org/show_bug.cgi?id=699675
2013-05-15 14:58:45 +01:00
Chris Cummins
242f611863 clutter-input-device-wayland: Update indentifier name
Fixes a discrepancy between the function name and the gtk-doc identifier
introduced in 8f4e39b6 when the Wayland input protocol changed.
2013-05-14 12:42:08 +01:00
Chris Cummins
3de7e49432 docs: Remove empty line before parameter tags
The gtk-doc parser has somewhat esoteric rules regarding blank lines and
paragraph breaks, causing these parameter descriptions to be missed. See:

https://developer.gnome.org/gtk-doc-manual/stable/documenting_syntax.html.en
2013-05-14 12:42:08 +01:00
Chris Cummins
a075c286f2 clutter-stage-wayland: Pedantic typo fix
Je ne parle pas français
2013-05-14 12:42:08 +01:00
Chris Cummins
15bed2d9bd wayland: Add API version annotations
Version numbers have been derived from source code comment blocks.
2013-05-14 12:42:08 +01:00
Bastian Winkler
cd9ba0ad8d flow-layout: Add :snap-to-grid property
Add a :snap-to-grid property to FlowLayout to prevent the layout from
assigning it's children a position based on the size of the largest
child.

https://bugzilla.gnome.org/show_bug.cgi?id=648873
2013-05-11 10:54:38 -04:00
Emmanuele Bassi
fd9109e6d6 Fix up "allow-none" annotation 2013-05-06 10:20:36 -07:00
Emmanuele Bassi
9424e995fa actor: Improve conditions for skipping implicit transitions
The "should this implicit transition be skipped" check should live into
its own function, where we can actually explain what it does and which
conditions should be respected.

Instead of just blindly skipping actors that are unmapped, or haven't
been painted yet, we should add a couple of escape hatches.

First of all, we don't want :allocation to be implicitly animated until
we have been painted (thus allocated) once; this avoids actors "flying
in" into their allocation.

We also want to allow implicit transitions on the opacity even if we
haven't been painted yet; the internal optimization that we employ in
clutter_actor_paint() and skips painting fully transparent actors is
exactly that: an internal optimization. Caller code should not be aware
of this change, and it should not influence code outside of ClutterActor
itself.

The rest of the conditions are the same: if the easing state's duration
is zero, or if the actor is both unmapped and not in a cloned branch of
the scene graph, then implicit transitions are pointless, as they won't
be painted.

https://bugzilla.gnome.org/show_bug.cgi?id=698766
2013-05-06 10:04:22 -07:00
Emmanuele Bassi
f92b78781d stage: Use precomputed constants instead of trigonometric functions
This should actually ensure that the calculations of the Z translation
for the projection matrix is resolved to "variable * CONSTANT". The
original factors are left in code so it's trivial to revert to the
trigonometric operations if need be, even without reverting this commit.
2013-05-06 10:04:22 -07:00