Commit Graph

5751 Commits

Author SHA1 Message Date
Daniel Stone
dfb145988e wayland: Only include Wayland headers in private
As wayland-client.h and wayland-server.h can't be included together,
split the Wayland backend file into clutter-backend-wayland.h, which
only defines the types, and clutter-backend-wayland-priv.h, which
actually uses the Wayland client types.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692851
2013-02-20 23:06:28 +00:00
Daniel Stone
b37b9d917a wayland-compositor: Don't use Wayland types in public API
The definition of wl_display differs between Wayland clients and
servers, and it's unsafe to include both wayland-client.h and
wayland-server.h at the same time.  Fudge around this by making the
compositor public API use void * rather than struct wl_display *.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692851
2013-02-20 23:06:28 +00:00
Damien Lespiau
3e479a3326 cogl: Don't use cogl_xlib_set_diplay()
This function is deprecated and has been replaced by set_display() on
the renderer. This is done in the get_renderer() vfunc of both the x11
and gdk backends already.

Actually cogl_xlib_set_diplay() is now a no-op and can be safely removed.

https://bugzilla.gnome.org/show_bug.cgi?id=687652
2013-02-20 23:06:28 +00:00
Jasper St. Pierre
534e994972 Don't do anything special with COGL_ENABLE_EXPERIMENTAL_2_0_API
This flag solely disables deprecated Cogl 1.0 API, so it
shouldn't be used for feature checks.

https://bugzilla.gnome.org/show_bug.cgi?id=694229
2013-02-20 23:06:28 +00:00
Josselin Mouette
e4598a9e52 actor: Use the correct return value
The get_z_rotation_gravity() method returns an enumeration value, not a
floating point value.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=694187
2013-02-20 23:06:28 +00:00
Emmanuele Bassi
65a024af92 timeline: Add progress-based marker API
Being able to set a marker at a normalized point on a timeline, instead
of using a specific time, is a nice fit with the current Timeline class
API.

https://bugzilla.gnome.org/show_bug.cgi?id=694319
2013-02-20 23:06:28 +00:00
Emmanuele Bassi
935997178c Add missing functions to clutter.symbols
https://bugzilla.gnome.org/show_bug.cgi?id=693767
2013-02-14 08:11:34 +00:00
Neil Roberts
4b92d656c2 settings: Don't reload config for fontconfig if there's no fontmap
If anything in the system changes the config for fontconfig then an
XSetting will be set to record the last timestamp of the config file.
This is presumably so that applications can be notified that it has
changed and can reload the configuration. However once this setting is
set it will remain set for the lifetime of the X server. This causes
Clutter to handle the setting during the initialisation of the
backend. Previously this would cause problems because Clutter would
end up creating the default PangoFontMap before the backend has
created the CoglContext. The PangoFontMap would in turn cause the
default CoglContext to be created. Clutter will then later create its
own CoglContext which means there will be two and the first one will
be leaked. Cogl currently can't really cope with multiple contexts
being created so it falls apart.

This patch fixes it to skip reloading the config for fontconfig if
there isn't a default font map yet. The config will presumably
naturally be read with the latest values when it is finally created
anyway so it doesn't need to be read immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=693696
2013-02-13 17:00:23 +00:00
Owen W. Taylor
b248941af5 Add clutter_stage_set_sync_delay()
New experimental API is added to allow changing the way that redraws
are timed for a stage to include a "sync delay" - a period after
the vertical blanking period where Clutter simply waits for updates.

In detail, the algorithm is that when the master clock is restarted
after drawing a frame (in the case where there are timelines running)
or started fresh in response to a queued redraw or relayout, the
start is scheduled at the next sync point (sync_delay ms after the
predicted vblank period) rather than done immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=692901
2013-02-13 09:27:17 -05:00
Neil Roberts
d0d1b562bd evdev: Fix use of the common XKB code for the evdev device
In commit 8f4e39b6d7 the Wayland code was updated to use the new
xkbcommon API. This involved changing the common XKB code shared with
the evdev input backend. However the evdev input backend was not
modified so it wouldn't compile. This patch just makes a minor change
to update it.

https://bugzilla.gnome.org/show_bug.cgi?id=693348
2013-02-08 12:02:26 +00:00
Adel Gadllah
683f15ba68 clutter-stage: Fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=669122
2013-02-06 18:21:27 +01:00
Adel Gadllah
b9ad93ad8d stage-cogl: Reuse backbuffer contents
Use the buffer_age extension when available to recycle backbuffer contents
instead of blitting from the back to front buffer when doing clipped redraws.

The picking is now done in a pixel that is going to be repaired during the next
redraw cycle for non static scences.

This should improve performance and avoid tearing.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=669122
2013-02-06 18:21:27 +01:00
Adel Gadllah
60f20e8a7e stage-window: make it possible to damage the back buffer
This allows us to report to the backend that the stage's back buffer has been trashed
while handling picking. If the backend is keeping track of the contents of back buffers
so it can minimize how much of the stage is redrawn then it needs to know when we do pick
renders so it can invalidate the back buffer.

Based on patch from Robert Bragg <robert@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=669122
2013-02-06 18:20:49 +01:00
Rui Matos
c0469601c7 x11/device-manager-xi2: Fix slave to master association
A slave is associated to a master device, not the other way around.

https://bugzilla.gnome.org/show_bug.cgi?id=692971
2013-02-01 10:13:01 +01:00
Yanko Kaneti
069abd1122 xi2: Fix access beyond array boundaries 2013-02-01 06:17:36 +02:00
Tomeu Vizoso
2eb525fe08 Add default handler for ClutterSwipeAction::swipe
So code that still uses the deprecated ::swept keeps working

https://bugzilla.gnome.org/show_bug.cgi?id=690735
2013-01-16 22:27:37 +00:00
Kouhei Sutou
36c15cd23c Fix a typo in ClutterEventType documentation
https://bugzilla.gnome.org/show_bug.cgi?id=691651
2013-01-16 22:25:04 +00:00
Nirbheek Chauhan
a783e6d3f2 clutter-text: Allow setting attributes for editable text
The behaviour imitates GtkEntry and ignores attributes from markup because Pango
barfs on invalid markup. Also add an example to the text-field interactive test.

https://bugzilla.gnome.org/show_bug.cgi?id=686477
2013-01-16 22:24:14 +00:00
Wouter Paesen
aa85a8e94d * use requested value of fullscreen state in clutter_stage_win32_set_fullscreen instead of old value
https://bugzilla.gnome.org/show_bug.cgi?id=690836
2013-01-16 22:21:11 +00:00
Wouter Paesen
8b357ec077 * added DllMain prototype to satisfy maintainer mode compiler error checking
https://bugzilla.gnome.org/show_bug.cgi?id=690835
2013-01-16 22:21:02 +00:00
Wouter Paesen
4a0e1b3e6a * removed clutter-shader.h dependency from clutter-backend-win32.c
https://bugzilla.gnome.org/show_bug.cgi?id=690833
2013-01-16 22:20:52 +00:00
Kouhei Sutou
19f0408290 Add missing "(constructor)" tag to clutter_color_alloc()
https://bugzilla.gnome.org/show_bug.cgi?id=691114
2013-01-16 22:20:39 +00:00
Emmanuele Bassi
2f5aee9cb5 Fix interpolation between ClutterRect instances
A stupid typo broke the linear interpolation function.
2013-01-15 18:19:07 +00:00
Jasper St. Pierre
578e81dc2e actor: Correct documentation formatting for clutter_actor_event()
TRUE and FALSE need to be symbolified here.
2013-01-14 13:00:28 -05:00
Jasper St. Pierre
0caba876e6 actor: Fix documentation reference for pivot-point 2013-01-14 13:00:28 -05:00
Jasper St. Pierre
4691878a76 x11: Ignore num lock / scroll lock for event state
As x11 considers num lock and scroll lock to be modifiers, code that
checks for an exact modifier combination will fail if naively done when
num lock or scroll lock are turned on. Applications that want to ignore
these modifiers will need to use XKB to manually mask out the modifier
state.

As it is very unlikely that applications will want to care about the
state of num lock or scroll lock for key press/key release events, mask
out the num lock and scroll lock keys automatically.

https://bugzilla.gnome.org/show_bug.cgi?id=690664
2013-01-14 12:56:07 -05:00
Daniel Stone
1a0e501efd X11: Use XFixes for show/hide cursor
This has been disabled since February 2008, on the grounds that XFixes
didn't work reliably for hiding cursors.  This has almost certainly been
fixed then and seems to work entirely reliably across a number of X
servers released in the past few years, and is definitely better than a
1x1 black dot for a cursor.

Helpfully though, where the spec states that the cursor will be hidden
when inside the specified window or one of its children, it actually
only uses the window to look up the Screen, and hides the cursor across
the entire Screen.  So, when using this, we also need to track crossing
events.

If it's still broken, this needs to be fixed in the X server.

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

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2013-01-10 17:10:50 +00:00
Jasper St. Pierre
6d2ab8fe51 swipe-action: Introduce new ::swipe signal
This deprecates the old ::swept signal, which didn't have a
handled boolean parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=689392
2012-12-18 01:27:32 +00:00
Emanuele Aina
cea8ea06f3 events: Make _clutter_process_event() reentrant
The _clutter_process_event() function may get called while already
servicing a _clutter_process_event() invocation (eg. when generating
ENTER events before emitting TOUCH_BEGIN).

In these cases clutter_get_current_event() would return NULL after
the inner call to _clutter_process_event() has finished, thereafter
making the current event inaccessible during the remaining portion
of the outer event emission.

By stacking the current events in ClutterMainContext instead of
simply replacing them we do not lose track of the real current event.

Also update clutter_get_current_event_time() to be consistent from a
reentrancy perspective.

https://bugzilla.gnome.org/show_bug.cgi?id=688457
2012-12-18 01:27:32 +00:00
Tomeu Vizoso
060b05cc29 actor: Remove transition when stopping it
This covers more cases when the transition completes but was still
being tracked by its actor.

https://bugzilla.gnome.org/show_bug.cgi?id=685982
2012-12-18 01:27:32 +00:00
Emmanuele Bassi
78a7a60b89 evdev: Fix missing ClutterEventSource member
https://bugzilla.gnome.org/show_bug.cgi?id=686692
2012-12-18 01:27:31 +00:00
Emmanuele Bassi
47c1e26385 Enable XInput support by default
Instead of using core events, we should move into the XXI century, and
use the XInput extension.

https://bugzilla.gnome.org/show_bug.cgi?id=673838
2012-12-18 01:27:31 +00:00
Emmanuele Bassi
1bdd0369e4 docs: Specify that RotateAction uses two touch points
Even if it's obvious, it's better to be explicit.
2012-12-18 00:16:28 +00:00
Emmanuele Bassi
bd58c0bb24 docs: Clean up ZoomAction signal and description
Remove the parts that were copied and pasted from DragAction.
2012-12-18 00:15:57 +00:00
Emmanuele Bassi
84b4f2f0a3 actor: Clean up the code in ::apply-transform
Instead of placing the whole body of the function inside an if block,
let's make it clear what each part of the function does. Also, add more
comments.
2012-12-18 00:05:42 +00:00
Emmanuele Bassi
1f3e99f886 Put g_type_init() under a version check
GLib 2.36 will deprecate g_type_init() in favour of automatic
initialization through a constructor function. We need to add the
version check to avoid a compiler warning.
2012-12-15 18:44:26 +00:00
Emmanuele Bassi
57956461dc docs: Fix ClutterPanAction signal annotation
Signals are defined as <ClassName>::<signal-name>; a single colon is
used for properties.
2012-12-15 18:43:56 +00:00
Emanuele Aina
219d0efcc6 actor: rollback pivot translation even on explicit transforms
When setting an explicit transform with clutter_actor_set_transform()
and a non (0,0) pivot-point, clutter_actor_apply_transform() will fail
to roll back the pivot-point translation done before multiplying the
transformation matrix due to the "out:" label being slightly misplaced
in clutter_actor_real_apply_transform().

This works properly:
  clutter_actor_set_pivot_point (actor, 0.5, 0.5);
  clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, 30);

This results in the actor being moved to the pivot-point position:
  clutter_actor_set_pivot_point (actor, 0.5, 0.5);
  clutter_matrix_init_identity(&matrix);
  cogl_matrix_rotate (&matrix, 30, 0, 0, 1.0);
  clutter_actor_set_transform (actor, &matrix);

This also add a conformance test checking that even when using a
pivot-point, no matter how a rotation is set the resulting
transformation matrix will be the same.

https://bugzilla.gnome.org/show_bug.cgi?id=690214
2012-12-14 19:15:48 +01:00
Chun-wei Fan
465ab95a64 clutter/clutter-rotate-action.c: Use G_PI instead of M_PI
...because M_PI is not universally available
2012-12-14 19:50:27 +08:00
Alejandro Piñeiro
a92e29d923 a11y: removed implementation notes comment from CallyText
Part of those notes were outdated. The other part is irrelevant
or has a bug assigned.
2012-12-10 18:09:06 +01:00
Tristan Van Berkom
f49aff9682 Fixed clutter_rect_intersection()
There was a typo where y was used instead of x.
2012-12-09 03:30:57 +09:00
Jasper St. Pierre
81903eca40 state: Fix a build-breaking typo
Spotted by Colin Walters <walters@verbum.org>. Took him half
an hour; I'm sorry :(
2012-12-02 22:32:25 -05:00
Jasper St. Pierre
45521b0417 Revert "swipe-action: Introduce new ::swipe signal"
This reverts commit 184b8c6fa6.
2012-12-02 20:19:14 -05:00
Jasper St. Pierre
511e266a85 A bunch of fixes for Coverity
None of these are relevant enough for their own fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:54 -05:00
Jasper St. Pierre
2034f1677d gdk: Fix realization in the foreign-window case
Found by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:54 -05:00
Jasper St. Pierre
ea2b368af9 text: Fix font fallback
Spotted by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:54 -05:00
Jasper St. Pierre
fbcab5f097 Fix some missing va_ends
Found by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:53 -05:00
Jasper St. Pierre
039ba910f0 grid-layout: Don't use uninitialized values
The clutter_actor_box_set_* methods rely on the current box
geometry, so we can't use those for an uninitialize actor box.
Found by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:53 -05:00
Jasper St. Pierre
5aca3c4992 cally-util: Don't free a NULL pointer
The only place key_event can not be NULL is in this branch.
Spotted by Coverity.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:53 -05:00
Jasper St. Pierre
184b8c6fa6 swipe-action: Introduce new ::swipe signal
This deprecates the old ::swept signal, which didn't have a
handled boolean parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=689392
2012-12-02 14:49:32 -05:00