Commit Graph

5773 Commits

Author SHA1 Message Date
Emmanuele Bassi
041d8b5d29 Clean up the Actor private header
Reading it is getting painful.
2013-03-13 15:05:27 -03:00
Alejandro Piñeiro
9618f37b1d Add method clutter_disable_accessibility ()
https://bugzilla.gnome.org/show_bug.cgi?id=691468
2013-03-13 18:56:58 +01:00
Jasper St. Pierre
36e25374cc event: Use gunichar when dealing with unicode characters
This makes introspection return the keycode as a string, rather
than an integer.

https://bugzilla.gnome.org/show_bug.cgi?id=695188
2013-03-12 17:09:29 -04:00
Jasper St. Pierre
c26d724f3d clutter-backend: Request XI2.3
Since XIQueryVersion, the bad API that it is, chooses the first client
version that it gets, we need to ensure that we pass XIQueryVersion the
new XI2.3 version, knowing fully well that Clutter won't be confused
by the new features.

https://bugzilla.gnome.org/show_bug.cgi?id=692466
2013-03-12 17:09:29 -04:00
Jasper St. Pierre
009da0c6ce x11: Always request XI2.2
The X server should fill in the minor version that it supports in the
case where it only supports the older version. We should not get a
BadRequest or fail the version check if we pass something higher.

https://bugzilla.gnome.org/show_bug.cgi?id=692466
2013-03-12 17:09:29 -04:00
Sebastian Keller
9dbc01b61f xi2: Reset scroll info for correct device on device change 2013-03-12 17:09:29 -04:00
Rui Matos
40ef7a5f6e x11/xi2: Factor the XKB group state in to fill events' modifier_state
Otherwise XkbTranslateKeyCode() won't yeld the correct keysyms when
group > 1.

https://bugzilla.gnome.org/show_bug.cgi?id=695260
2013-03-06 13:36:09 +01:00
Alejandro Piñeiro
ccea1644ba a11y: expose the text with password-char
Text exposed by the AtkText methods should be the text
displayed to the user (like the internal method
clutter_text_get_display_text). So it should use the password-char
if it is being used.

This is also a security concern.
2013-03-05 19:47:48 +01:00
Alejandro Piñeiro
78a3590fd6 a11y: cally-util: use password-char to fill a key_event if required 2013-03-05 19:47:45 +01:00
Emmanuele Bassi
a622d34444 actor: Revert the Transition/Actor leak fix
The original code inside ClutterActor that dealt with Transitions
stopping was written for the ::completed signal, thus the code was
correctly handling the lifetime of the instances; when we moved to the
::stopped signal, we assumed that it worked in the same way - with less
conditions to be checked, obviously, but fundamentally similar to the
::completed signal. Sadly, I screwed up the signal definition, and the
signal ended up calling our handlers, but not the default one that did
the cleanup and released references on the Animatable instance.

After fixing the Timeline::stopped signal, we can go back to the
previous code.

Thanks to Craig Hughes for the help in tracking down this mess.

https://bugzilla.gnome.org/show_bug.cgi?id=695158
2013-03-05 00:48:11 +00:00
Emmanuele Bassi
4732a418ba timeline: Use the right function pointer offset
A copy and paste thinko: the ::stopped signal is using the
ClutterTimelineClass.completed slot instead of the .stopped one,
thus preventing sub-classes of ClutterTimeline from overriding the
signal's default closure.
2013-03-05 00:46:45 +00:00
Emmanuele Bassi
f3659d35a0 actor: Release a reference on the implicit Transitions
When stopping the transition we need to release the reference we
maintain while removing the Transition from the hash table inside an
actor. If we fail to do so, the Transition is never released, which
means we leak the Animatable instance we tied to it.

https://bugzilla.gnome.org/show_bug.cgi?id=695158
2013-03-04 23:06:27 +00:00
Emmanuele Bassi
315a73edf5 text: Clean up the set_font_description_internal() semantics
The current semantics are ridiculous, and clearly a case of (mistaken)
premature optimization. All setters should copy, not transfer ownership.

https://bugzilla.gnome.org/show_bug.cgi?id=695119
2013-03-04 13:06:39 +00:00
Emmanuele Bassi
1f3e56b3be docs: Clean up the documentation for the allocate() methods
The wording could be better, especially on the side effects and the
honoured state.
2013-03-04 12:24:24 +00:00
Emmanuele Bassi
67f10bcc6f docs: Clean up the wording of a couple of comments 2013-03-04 12:24:24 +00:00
Emmanuele Bassi
78962f9ab9 deform-effect: Don't use deprecated API
The ClutterOffscreenEffect.get_target_size() method has been deprecated,
and replaced by the get_target_rect() one. We can easily switch to the
latter, and avoid the deprecation warning.

https://bugzilla.gnome.org/show_bug.cgi?id=670004
2013-03-04 12:24:24 +00:00
Emmanuele Bassi
37e3ef2303 offscreen-effect: Add a method to get the target area
The target size is not always enough, there are cases where the offset
used to paint the target must also be available for developers
implementing an OffscreenEffect.

The get_target_rect() method returns the rectangle used to paint the
target, with the offsets in the ClutterRect:origin and the texture size
in the ClutterRect:size fields, respectively.

The get_target_size() method should be deprecated, given that its
replacement is generally more useful.

https://bugzilla.gnome.org/show_bug.cgi?id=670004
2013-03-04 12:24:23 +00:00
Rui Matos
b01469c8f3 x11/clutter-keymap-x11: Honor XkbNewKeyboardNotify events
We already select for XkbNewKeyboardNotify events but are not acting
on them. Start doing so.

https://bugzilla.gnome.org/show_bug.cgi?id=694267
2013-02-24 18:35:53 +01:00
Emmanuele Bassi
e317ca11fc Fix compiler warnings by initializing variables 2013-02-21 00:39:15 +00:00
Jasper St. Pierre
50f6b2ac2c actor: Fix clutter_actor_allocate_align_fill for partially-filled actors
If we pass TRUE for x_align and FALSE for y_align, the full available
width should be passed to clutter_get_preferred_height, and the same
should be true in the other dimension.

https://bugzilla.gnome.org/show_bug.cgi?id=694237
2013-02-21 00:13:11 +00:00
Emmanuele Bassi
1a0bbbaf54 cally: Use AktObject::get_name()
Instead of directly accessing the instance fields. This removes a
compiler warning after the constification of g_get_prgname(), and it
seems to me to be generally more correct.
2013-02-20 23:30:21 +00:00
Emmanuele Bassi
01ba68ad3b scroll-actor: Use :child-transform
Instead of using a custom apply_transform(), paint(), and pick()
implementations, we can simply apply a transformation to the children of
a ScrollActor.

https://bugzilla.gnome.org/show_bug.cgi?id=686225
2013-02-20 23:06:28 +00:00
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