1
0
Fork 0
Commit graph

9095 commits

Author SHA1 Message Date
Emmanuele Bassi
b5fd0fe7fe tests/interactive: Fix compiler warning
Missing type for the closure argument.
2015-06-18 16:29:26 +01:00
Gustavo Noronha Silva
0c75e17814 Add PanAxis mode that automatically pins scroll based on initial movement
This code is inspired by the implementation of the same feature for the
Mx toolkit's MxKineticScrollView. See commit 4d08771.

https://bugzilla.gnome.org/show_bug.cgi?id=707982
2015-06-11 15:47:48 -03:00
Carlos Garnacho
2105055a34 gdk: Enable GDK_TOUCH_MASK on the stage window
This allows touch events to be received and translated.

https://bugzilla.gnome.org/show_bug.cgi?id=750496
2015-06-11 15:06:55 +01:00
Carlos Garnacho
7ed3714a94 gdk: Ignore synthesized leave events out of touch events
Certain crossing modes notify about synthesized events, where
the pointer didn't really leave the window. Unsetting the stage
from the device at that time is incorrect, and will leave all
remaining touches unable to pick coordinates, so silently eaten
away.

https://bugzilla.gnome.org/show_bug.cgi?id=750496
2015-06-11 15:06:55 +01:00
Emmanuele Bassi
2d5b5aa82a gdk: Add function to retrieve the GdkVisual
Straight from Cogl.

This allows us to propagate the GdkVisual Cogl and Clutter use to
embedding toolkits, like GTK+.

The function is annotated as being added to the 1.22 development
cycle because it will be backported to the stable branch, so that
downstream developers can package up a version of Clutter that does
not crash on nVidia.

https://bugzilla.gnome.org/show_bug.cgi?id=747489
2015-06-10 19:09:21 +01:00
Emmanuele Bassi
c91621e8c2 gdk: Use the Cogl visual on Xlib winsys
GDK 3.16 started selecting different visuals, to best comply with the
requirements for OpenGL, and this has broken Clutter on GLX drivers that
are fairly picky in how they select visuals and GLXFBConfig.

GDK selects GLXFBConfig that do not include depth or stencil buffers;
Cogl, on the other hand, needs both depth and stencil buffers, and keeps
selecting the first available visual, assuming that the GLX driver will
give us the best compliant one, as per specification. Sadly, some
drivers will return incompatible configurations, and then bomb out when
you try to embed Clutter inside GTK+, because of mismatched visuals.

Cogl has an old, deprecated, Clutter-only API that allows us to retrieve
the XVisualInfo mapping to the GLXFBConfig it uses; this means we should
look up the GdkVisual for it when creating our own GdkWindows, instead
of relying on the RGBA and system GdkVisuals exposed by GDK — at least
on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=747489
2015-06-10 19:06:25 +01:00
Emmanuele Bassi
dd9e43e98d build: No need to conditionally include -Wshadow
Cogl is not in tree any more, and compiler warnings are properly
addressed.
2015-06-10 14:01:32 +01:00
Emmanuele Bassi
0eb300e2ee build: Use the same pattern for the manual Mir check
Ensure that the checks are similar and create similar results.
2015-06-10 14:00:05 +01:00
Emmanuele Bassi
2fd47ce08e build: Manually check for Wayland support in Cogl
The Cogl pkg-config file does not specify the supported backends, which
means we need to manually check for the platform, like we do for Mir.
2015-06-10 13:59:18 +01:00
Emmanuele Bassi
e5941ee810 build: Remove unused internal defines
We don't use them any more in the code base.

I swear I keep deleting them, and they keep popping back up.
2015-06-10 12:32:26 +01:00
Emmanuele Bassi
c4fa3514ad Use the public symbol for Wayland compositor support
Instead of using a private one. This way, if things go out of sync,
we'll notice immediately.
2015-06-10 12:31:51 +01:00
Emmanuele Bassi
a1c4acf227 Add missing include
Some X11-related system header is leaking stdlib.h, so when we disable
the X11 backend we get a compiler warning for atol().
2015-06-10 12:28:59 +01:00
Emmanuele Bassi
896e43cbd5 gdk/device: Propagate more device details from GDK
In order to do device matching we need to propagate more information,
like the device_id (only on X11 with the XInput2 extension enabled),
the vendor id, and the product id.

https://bugzilla.gnome.org/show_bug.cgi?id=747951
2015-06-03 13:08:01 +01:00
Dima Ryazanov
71743ef660 Fix a compile error when the X11 backend is disabled
When defining clutter_stage_gdk_update_foreign_event_mask, check for the
same macros as when actually using it.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
2015-05-29 10:13:03 +01:00
Carlos Garnacho
fbe2c74e19 swipe-action: Fix typo
X coords are meant to compare with distance_x.
2015-05-26 19:05:20 +02:00
Carlos Garnacho
a4962c0336 swipe-action: Prepare for multifinger swipes
Its ::gesture-end implementation used to check the press/release
coordinates for the first touchpoint. On multifinger swipes, we
can receive this vfunc called due to other touch sequence going
first, so we'd get 0/0 as the release coordinates for this still
active sequence, resulting in bogus directions.

Instead, check the last event coordinates, that will be always
correct regardless of whether the touchpoint 0 finished yet or
not.

https://bugzilla.gnome.org/show_bug.cgi?id=749739
2015-05-26 19:02:51 +02:00
Emmanuele Bassi
67bf902022 Move API reference down one level
Since we only have one API reference, we can drop the clutter/
sub-level, and have all the files under doc/reference.
2015-05-19 15:27:30 +01:00
Emmanuele Bassi
c7bbe2a9f6 Remove the separate Cally API reference 2015-05-19 15:27:30 +01:00
Emmanuele Bassi
6088437786 docs: Merge Clutter and Cally API reference
It's pretty much pointless to have two API references:

 • the Cally API reference is fairly small
 • the build system is already complicated as it is
 • GTK-Doc isn't smart enough to ignore sub-directories
 • Cally is not a separate library, just a separate namespace

There are some issues with GTK-Doc not accepting multiple namespaces,
but nothing seriously tragic.
2015-05-19 15:27:30 +01:00
Emmanuele Bassi
c71dfa2162 docs: Remove stray XML element
We moved to Markdown a while ago, but a stray </para> was left in.
2015-05-19 15:27:30 +01:00
Emmanuele Bassi
27ea26cbaf build: Clean up Cally's API reference Makefile 2015-05-19 15:27:29 +01:00
Emmanuele Bassi
68df19790e docs: Add missing version symbols 2015-05-19 15:27:29 +01:00
Emmanuele Bassi
c99ce18efb actor: Guard against negative-sized allocations
The allocate_align_fill() method may end up trying to allocate an actor
with a negative size, due to rounding and floating point operations.

https://bugzilla.gnome.org/show_bug.cgi?id=749420
2015-05-19 15:27:29 +01:00
Emmanuele Bassi
e72a1a44e6 actor: Ensure allocation adjustment is safe against zero sizes
We already copy with negative end results, but there's no point in doing
the work in the first place.
2015-05-19 15:27:29 +01:00
Marek Černocký
5dfd4445e2 Updated Czech translation 2015-05-18 13:56:25 +02:00
Rui Matos
9268bb9144 x11: Fix touchpad detection
Commit 79849ef1d5fff9acd310cd68d59df0c7cf2cb28f had a typo in the
device property format check. This property is formated in 8-bit
items, not 32-bit.

This went unnoticed till now because some touchpads were still being
detected as such due to a second check below:

      else if (strstr (name, "touchpad") != NULL)
        source = CLUTTER_TOUCHPAD_DEVICE;

https://bugzilla.gnome.org/show_bug.cgi?id=749482
2015-05-18 11:43:58 +02:00
Emmanuele Bassi
9f329aed1d docs: Fix 1.24 symbols reference title 2015-05-12 13:03:39 +01:00
Emmanuele Bassi
38f3d7770e build: Fix the URLs in the release email template
Use https:// URI consistently, and point at the right location for the
cookbook.
2015-05-12 11:51:04 +01:00
Matthieu Bouron
8aea8bc463 clutter-backend-gdk: Only set setting on successful gdk_screen_get_setting call
It could happen that gdk_screen_get_setting fails to retreive
Gdk/WindowScalingFactor which leads to the following warnings when
clutter_init is called:

GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'window-scaling-factor' of type 'gint'
GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'dnd-drag-threshold' of type 'gint'

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

Slightly edited to fix up whitespace issues.

Edited-by: Emmanuele Bassi <ebassi@gnome.org>
2015-05-12 11:14:14 +01:00
Emmanuele Bassi
f07b44e70c docs: Add 1.24 symbols index 2015-05-10 16:35:31 +01:00
Emmanuele Bassi
8fc8a73580 gdk: Use RGBA visual if there is one
The condition check for the has_rgba_visual flag is reversed, and thus
we relied on drivers returning an ARGB visual first by default.

Referenced by: https://bugzilla.redhat.com/show_bug.cgi?id=1206960
2015-05-07 13:28:33 +01:00
Emmanuele Bassi
9584b23958 docs: Fix typo in ClutterStage::deactivate 2015-05-01 16:51:12 +01:00
Emmanuele Bassi
e15f520a9e examples: Add transparency to the rounded rectangle
Makes it a bit more fancy.
2015-04-30 13:04:32 +01:00
Emmanuele Bassi
54a2a20e38 actor: Remove trailing new line
The debug messages have a new line by default.
2015-04-30 12:42:44 +01:00
Emmanuele Bassi
8b8aa0b492 actor: Use the real opacity when clearing the stage
The paint opacity for a top level is always overridden to be the full
value, since it's a composited value and we want to paint our scene.

When clearing the stage framebuffer, though, we want to use the actual
opacity, if ClutterStage:use-alpha is set.
2015-04-30 12:40:39 +01:00
Jasper St. Pierre
21ce9bc08b clutter-stage-cogl: Match EGL's behavior of eglSwapBuffersWithDamage
-1 is explicitly an invalid value to pass to eglSwapBuffersWithDamage,
and the specification admits as much:

                                                         If
    eglSwapBuffersWithDamageEXT is called and <n_rects>, is less
    than zero or <n_rects> is greater than zero but <rects> is
    NULL, EGL_BAD_PARAMETER is generated.

Fix up our usage of SwapBuffersWithDamage to match the behavior in the
EGL specification.

https://bugzilla.gnome.org/show_bug.cgi?id=745512
2015-04-29 22:41:58 +01:00
Emmanuele Bassi
10a9657db0 build: Skip gitignore files when not building from git
There's really no point in going through the motions there.
2015-04-23 21:33:30 +01:00
Emmanuele Bassi
a67997ef39 build: Create .gitignore files in the current directory
We cannot touch srcdir when distchecking.
2015-04-23 21:23:50 +01:00
Emmanuele Bassi
f8687f9430 tests: Remove calls to clutter_x11_enable_xinput()
The function is deprecated and useless: support for XInput is always
enabled, if the extension is available.
2015-04-23 20:18:25 +01:00
Emmanuele Bassi
fc93887728 docs: Add new actor state methods 2015-04-23 20:12:25 +01:00
Emmanuele Bassi
dac33c5fea Stop using macros for accessing actor state
Use the newly added functions instead.
2015-04-23 17:39:30 +01:00
Emmanuele Bassi
4c6a550d13 Soft-deprecation of actor state macros
These are just terrible API that we've been stringing along since the
0.x days. We cannot truly deprecate them, because they are, in some
cases, the only actual API to perform some operation, and porting all
the code in the world is not going to make us any friends.

For the time being, we use a deprecation notice in the documentation.
2015-04-14 12:46:49 +01:00
Emmanuele Bassi
849607316a actor: Add functions mapping to state query macros
The macros are useless for language bindings, and are terribly unsafe
from C as well. There's always the option of using the GObject
properties they refer to, but it's more efficient to just have a simple
getter function.
2015-04-14 12:37:42 +01:00
Emmanuele Bassi
4006b8524d Add version macros for 1.24 2015-04-14 12:29:58 +01:00
Emmanuele Bassi
877e58a6b4 x11: Plug a leak on error path
If XIGetProperty() does not return what we expect, but still returned
something, we need to free it.
2015-04-09 12:35:23 +01:00
Emmanuele Bassi
83cd36e95f x11: Improve touchpad detection heuristics
We should use the same heuristics used by GDK in order to detect whether
a device is a touchpad or not.

Based on the similar code from Carlos Garnacho for GDK:
https://git.gnome.org/browse/gtk+/commit/?id=6f07d5e7

https://bugzilla.gnome.org/show_bug.cgi?id=747436
2015-04-09 11:03:16 +01:00
Emmanuele Bassi
bb52fa81ce Post-branch version bump to 1.23.1 2015-03-23 13:30:50 +00:00
Emmanuele Bassi
d362e373bb actor: Fix a compiler warning 2015-03-23 13:24:52 +00:00
Emmanuele Bassi
505801cd09 gdk: Fix stage removal from the master clock
Prevents a double-free in the conformance test suite.
2015-03-23 13:24:44 +00:00
Emmanuele Bassi
83edd9c4c5 Post-release version bump to 1.22.1 2015-03-23 11:27:58 +00:00