Commit Graph

5872 Commits

Author SHA1 Message Date
Emmanuele Bassi
77ec8774a0 WARNING: Massive revert commit
Revert all the work that happened on the master branch.

Sadly, this is the only way to merge the current development branch back
into master.

It is now abundantly clear that I merged the 1.99 branch far too soon,
and that Clutter 2.0 won't happen any time soon, if at all.

Since having the development happen on a separate branch throws a lot of
people into confusion, let's undo the clutter-1.99 → master merge, and
move back the development of Clutter to the master branch.

In order to do so, we need to do some surgery to the Git repository.

First, we do a massive revert in a single commit of all that happened
since the switch to 1.99 and the API version bump done with the
89a2862b05 commit. The history is too long
to be reverted commit by commit without being extremely messy.
2015-01-03 20:34:20 +00:00
Gustavo Noronha Silva
266eac1ebb clutter-canvas: cache the texture to avoid uploads
When an actor carrying canvas content is repainted, it will currently reupload
the data from the buffer to a texture. While this is not a performance problem
on a desktop, some mobile environments take a big performance hit. This
change tracks data changes and only recreates the texture if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=729144
2014-04-28 17:55:36 -03:00
Gustavo Noronha Silva
bfba8cd5c8 clutter-main: start mainloop timer on clutter_init()
By creating and starting the timer on clutter_main() an assumption is made
that that is how the main loop will be run for all clutter applications.
With more and more applications moving to GApplication, this assumption no
longer holds true.

Moving to clutter_init() means we are starting the timer earlier than we
should, and by not stopping it when the main loop quits we are taking a
measure that is later than we should. I believe it is safe to consider
those are close enough to the actual beginning and quitting of the main
loop in practice.

https://bugzilla.gnome.org/show_bug.cgi?id=728521
2014-04-18 19:03:52 -03:00
Bastian Winkler
25a092b604 grid-layout: Use correct orientation when requesting preferred child size
Otherwise width and height are swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=725722
2014-03-12 00:39:54 +01:00
Chun-wei Fan
ae58ad8c46 Fix The Win32 Backend for Newer Visual Studio Versions
The GetSystemMetrics() function returns wrong values for SM_CXSIZEFRAME,
SM_CYSIZEFRAME, SM_CXFIXEDFRAME and SM_CYFIXEDFRAME when built with Visual
Studio 2012 and 2013 (unless the XP compatibility setting for the
PlatformToolset entry is turned on), causing the window of Clutter programs
to automatically shrink to a point where they become unusable.

This patch uses AdjustWindowRectEx() for builds using Visual Studio 2012
and later, which deduces the required height and width of the Window
properly.  Unfortunately we can't use this for the VS 2008/2010 builds as
they cause the Window to continually expand as the program is run.

https://bugzilla.gnome.org/show_bug.cgi?id=725873
2014-03-08 18:38:19 +08:00
Carlos Garnacho
45935fbe29 x11: Avoid invalid ClutterInputDevice pointers in the device list
Due to the way add_device() invariably adds to the master/slave device
lists, while keeping ClutterInputDevices 1:1 with device IDs, it may
leave invalid pointers in the list if add_device() is called multiple
times for the same device ID. There are two situations where this may
happen:

1) If devices are disabled and later enabled: devices are added invariably
   to the master/slave lists on constructed(), but then on XIDeviceEnabled
   they'd get added yet again.
2) Racy cases where the ClutterDeviceManager is created around the same time
   XIHierarchyEvents are sent. When getting the XIDeviceInfo on constructed(),
   these devices may already appear as enabled, even though XIDeviceEnabled
   is seen through XIHierarchyEvents processed in the event loop sortly after.

   This last case can be seen when starting gnome-shell on a different tty,
   and entering in the one it's been spawned on, clutter initialization
   happens around the same time devices are added back because of the tty
   switch, and multiple extra ClutterInputDevices are created.

https://bugzilla.gnome.org/show_bug.cgi?id=724971
2014-02-25 10:15:03 +01:00
Daniel Mustieles
0258c72a5f Updated FSF's address 2014-01-23 12:47:12 +01:00
Florian Müllner
f6ad53d9e0 input-device: Guard against double free
Dispose() may be called more than once, so calling g_free directly
on the device name is unsafe. Instead, use g_clear_pointer() to
make sure we don't attempt to free the memory again.

https://bugzilla.gnome.org/show_bug.cgi?id=719563
2013-12-02 00:29:47 +01:00
Owen W. Taylor
9a471cf08d Don't queue redraws when reallocating actor that haven't moved
When support for implicit animation of actor position was added,
the optimization for not queueing when allocating an actor back
to the same location was lost. This optimization is important
since when we are hierarchically allocating down from the top of
the stage we constantly reallocate the actors at the top of the
hierarchy back to the same place.

https://bugzilla.gnome.org/show_bug.cgi?id=719368
2013-11-26 12:35:33 -05:00
Owen W. Taylor
0d0248b31f Bind constraints: Don't force redraws on source relayout
When the source actor potentially changes size, that shouldn't
necessarily result in the target actor being redrawn - it should
be like when a child of a container is reallocated due to changes
in its siblings or parent - it should redraw only to the extent
that it is moved and resized. Privately export an internal function
from clutter-actor.c to allow getting this right.

https://bugzilla.gnome.org/show_bug.cgi?id=719367

Conflicts:
	clutter/clutter-actor.c
2013-11-26 12:35:07 -05:00
Lionel Landwerlin
90c05e98a8 stage: implement touch event throttling
https://bugzilla.gnome.org/show_bug.cgi?id=709761
2013-10-09 21:58:16 +01:00
Bastien Nocera
79c2d3ede7 ClutterEvent: Mention _get_source_device() in docs
It's too easy getting bitten by the ->device red herring, thinking
that it's the original input device the event originated from.

https://bugzilla.gnome.org/show_bug.cgi?id=709620
2013-10-08 14:59:13 +02:00
Bastien Nocera
09085b3fee actor: Correct setting the offscreen-redirect property
It's a flags property, not an enum one.

https://bugzilla.gnome.org/show_bug.cgi?id=708922
2013-09-27 16:41:52 +02:00
Rob Bradford
29eef6de61 wayland: Check for NULL surface on pointer leave events
In the protocol this is the expected behaviour when the client has
destroyed the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=707377
2013-09-09 18:19:28 +01:00
Rob Bradford
2b8fcfd75b wayland: When resizing only trigger a redraw if the stage has been shown
This is necessary to avoid a deadlock with the compositor. When setting
a stage size before the stage was shown this would trigger a redraw
inside clutter_stage_wayland_resize. This redraw would result
in a call into eglSwapBuffers which would attach a buffer to the surface
and commit. Unfortunately this would happen before the role for the
surface was set. This would result in the compositor not relaying to the
client that the desired frame was shown.

With this change the call to wl_shell_surface_set_toplevel is always
made before the first redraw.

https://bugzilla.gnome.org/show_bug.cgi?id=704457
2013-08-12 19:13:57 +01:00
Rob Bradford
b6a931c8d9 wayland: Only process enter and leave events Clutter created surfaces
When combining with GTK we will receive enter and leave events for surfaces
from both toolkits therefore we must filter our events appropriately.
2013-08-04 15:45:01 +01:00
Rob Bradford
61dc824c91 wayland: Check there is valid pointer or keyboard focus for events 2013-08-04 15:44:42 +01:00
Rob Bradford
de933213b7 wayland: Only create and act on shell_surface for non-foreign surfaces
We should not create a shell surface and set the role for that shell
surface if the surface was a foreign one provided through
clutter_wayland_set_wl_surface

https://bugzilla.gnome.org/show_bug.cgi?id=699578
2013-07-23 18:27:55 +01:00
Chris Cummins
d390a44615 wayland: Add foreign surface support to stage
This adds support for optionally a providing a foreign Wayland surface
to a ClutterStage before it is first show. Setting a foreign surface
prevents Cogl from allocating a surface and shell surface for the stage
automatically.

v2: add CLUTTER_AVAILABLE_IN_1_16 annotation and API reference docs
    (review from Emmanuele Bassi)
v3: set a boolean to indicate that this stage is using a foreign surface
(Rob Bradford)

https://bugzilla.gnome.org/show_bug.cgi?id=699578
2013-07-23 18:27:52 +01:00
Rob Bradford
a5230278b4 wayland: Add API for disabling the event dispatching
This allows the integration of Clutter with another library, like GTK+,
that is dispatching the events itself. This is implemented by calling
into the cogl_wayland_renderer_set_event_dispatch_enabled() and since
that function must be called on the newly created renderer the newly
added clutter_wayland_disable_event_retrieval must be called before
clutter_init()

https://bugzilla.gnome.org/show_bug.cgi?id=704279
2013-07-23 18:27:50 +01:00
Adel Gadllah
74ab8c3bda clutter-actor: Make clutter_actor_has_mapped_clones public
This allows some optimisations to be done that work when they are no clones.

https://bugzilla.gnome.org/show_bug.cgi?id=703336
2013-07-17 12:38:07 +02:00
Rob Bradford
3d646804d1 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 13:11:23 +01:00
Rob Bradford
6521701e29 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:36:49 +01:00
Rob Bradford
5c93c0a1af 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-06-28 12:15:40 +01:00
Rob Bradford
cba63dd93f 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:38:44 +01:00
Rob Bradford
c3be92a30c wayland: Remove now removed CLUTTER_AVAILABLE_ API annotations
In 00bee5f the API annotations were removed as the API is refreshed from
the start. This change removes the annotations from the Wayland API.

https://bugzilla.gnome.org/show_bug.cgi?id=703202
2013-06-28 11:38:44 +01:00
Adel Gadllah
2f95de91c4 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:28:39 +02:00
Cosimo Cecchi
670d2357a6 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:04:25 -07:00
Lionel Landwerlin
90243e9d88 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:50:12 +01:00
Chris Cummins
8231aae3ad 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:28:21 +01:00
Chris Cummins
188f7d6881 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:28:16 +01:00
Chris Cummins
f2918d1a0f clutter-stage-wayland: Pedantic typo fix
Je ne parle pas français
2013-05-14 12:28:11 +01:00
Chris Cummins
6e6e69c84d wayland: Add API version annotations
Version numbers have been derived from source code comment blocks.
2013-05-14 12:28:04 +01:00
Bastian Winkler
55ec9f57db 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 11:04:40 -04:00
Erick Pérez Castellanos
d2fbe4db1b Removed unused ClutterKnot
Migration Complete. When you want to use ClutterKnot
use ClutterPoint instead.
Updated clutter.symbols to pass 'make check'
2013-05-03 10:16:25 -04:00
Erick Pérez Castellanos
b1fa6434e1 Migrated ClutterPathNode to use ClutterPoint
Removed the use of ClutterKnot almost everywhere
Updated casting to get the data from the variable arguments list
2013-05-03 10:11:25 -04:00
Erick Pérez Castellanos
7c6d0251dd Migrated internal ClutterBezier to float.
Initial stage of ClutterPath migration to using float.
Naive implementation of ClutterBezier, for now the points along
the curve doesn't move at a regular speed. It is required a more
precise calculation of the length of the curve for that to happen.
Anyway the old implementation worked like this.
2013-05-03 10:11:25 -04:00
Alban Crequy
2be42c333a ClutterDragAction: do not dereference a NULL priv->stage
When destroying an actor during a drag-action with a drag_handle, the
ClutterDragAction's priv->stage could be set to NULL in _set_actor().
_dispose() must not assume that priv->stage is not NULL.

See also https://bugzilla.gnome.org/show_bug.cgi?id=681814
2013-04-30 17:44:51 +01:00
Alban Crequy
a0d9eaf15d fix crash when destroying an actor during a drag-action with a drag_handle
Bug introduced by commit 59801ef8 (drag-action: fix press coords transform
with drag_handle) for bgo#681746.

See also https://bugzilla.gnome.org/show_bug.cgi?id=681814
2013-04-29 18:07:03 +01:00
Emilio Pozuelo Monfort
5586b0deba GDK: fix build when the X11 backend is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=695710
2013-04-29 08:56:21 +02:00
Lionel Landwerlin
9cb6276255 zoom-action: improve zooming behavior
https://bugzilla.gnome.org/show_bug.cgi?id=698674
2013-04-23 17:34:39 +01:00
Lionel Landwerlin
221fa225b3 gesture-action: refactor event handling function
https://bugzilla.gnome.org/show_bug.cgi?id=698671
2013-04-23 17:34:39 +01:00
Lionel Landwerlin
04f20909e3 gesture-action: fix trigger edge after behavior with more than 1 point
https://bugzilla.gnome.org/show_bug.cgi?id=698669
2013-04-23 17:34:39 +01:00
Lionel Landwerlin
2b25b056ad gesture-action: add n-touch-points property
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:34:39 +01:00
Lionel Landwerlin
ed92f63f30 gesture-action: avoid shadowing time() syscall function
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:33:23 +01:00
Lionel Landwerlin
1ee07e5d48 gesture-action: fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=698668
2013-04-23 17:33:20 +01:00
Emmanuele Bassi
af2f9857fe 2.0: Update the symbols file 2013-04-05 18:48:04 +01:00
Emmanuele Bassi
b0f3192802 2.0: Fix up documentation annotations 2013-04-05 18:48:04 +01:00
Emmanuele Bassi
ca3e1b4d11 2.0: Include clutter headers conditionally in clutter-x11.h
We want to avoid clutter-x11.h leaking Clutter symbols (i.e. you need to
include clutter.h yourself before including clutter-x11.h), but we need
to do so conditionally, so that ancillary stuff like gtk-doc and
g-ir-scanner get the right types while building Clutter itself.
2013-04-05 18:48:03 +01:00
Emmanuele Bassi
b4758c3526 2.0: Fix up the versioning macros 2013-04-05 18:48:03 +01:00