Commit Graph

6147 Commits

Author SHA1 Message Date
Peter Hutterer
ede13b11d7 evdev: use libinput's new merged scroll events
libinput's API changed from separate scroll events for vert/horiz scrolling to
a single event that contains both axes if they changed.

Updated by Armin K. to use the discrete axis value for wheel events as done
in Weston.

https://bugzilla.gnome.org/show_bug.cgi?id=742829
2015-01-16 14:45:47 +00:00
Emmanuele Bassi
7eb1a3d35f Deprecate unused enumeration types
Some enumerations types are only used by deprecated API, so it's better
to deprecate them as well.
2015-01-13 00:46:47 +00:00
Emmanuele Bassi
8859ed44e1 gdk: Support GdkWayland
We need to set up the Wayland display when using GDK and Wayland's
client-side API.
2015-01-12 17:48:04 +00:00
Emmanuele Bassi
00efa5371d gdk: Compare integer values
Stage sizes are always pixel aligned, so we can do a proper
integer comparison.
2015-01-12 15:05:02 +00:00
Emmanuele Bassi
2aac32694c gdk: Implement get_scale_factor()
Otherwise scaling will not work correctly.
2015-01-12 15:04:27 +00:00
Emmanuele Bassi
87c553e94f docs: Deprecate ClutterTextureFlags
It's pointless, now that ClutterTexture has been deprecated.
2015-01-12 13:42:59 +00:00
Emmanuele Bassi
e77adac16a docs: Remove a couple of FIXMEs
Document the ClutterKeyframeTransition instance and class structures.
2015-01-12 13:42:33 +00:00
Emmanuele Bassi
60dbeb9425 Try again at using the GDK backend by default
We tried once with commit 398a7ac7 and ended up reverting because of
regressions in the input layer and on Wayland.

We should try again, now that those regressions have been fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=734587
2015-01-11 16:48:47 +00:00
Carlos Garnacho
f5f523c63a evdev: Set vendor/product IDs on input devices
This is fetched right away from libinput API.

https://bugzilla.gnome.org/show_bug.cgi?id=740759
2015-01-09 17:01:22 +01:00
Carlos Garnacho
c0d5d58e8b x11: Set vendor/product IDs on input devices
This is fetched from XInput device properties

https://bugzilla.gnome.org/show_bug.cgi?id=740759
2015-01-09 17:01:22 +01:00
Carlos Garnacho
78fdefcf0c input-device: Add vendor/product ID properties and getters
This may be useful when trying to identify the device across sessions.

https://bugzilla.gnome.org/show_bug.cgi?id=740759
2015-01-09 17:01:22 +01:00
Jonas Danielsson
9660b001f7 device-manager-xi2: Fix scaling of coordinates
Do not CLAMP to width/height before applying the scale factor
we will lose all information we need to scale properly.

https://bugzilla.gnome.org/show_bug.cgi?id=730815
2015-01-09 06:38:24 -05:00
Emmanuele Bassi
c04c631e8c keysyms: Update the list of key symbols 2015-01-03 20:05:22 +00:00
Emmanuele Bassi
506f2c4431 Remove unused pointer
The PangoContext has been moved into ClutterActor.
2015-01-01 15:16:40 +00:00
Emmanuele Bassi
1b9650da38 Remove global "actor id"
It's absolutely, positively pointless. Every surviving call has long
since been deprecated, and should have not been public in the first
place.
2015-01-01 15:10:54 +00:00
Emmanuele Bassi
abda3ee4ce Improve debugging notes for main loop start/stop
This way, we can track when we quit the main loop.
2015-01-01 15:09:23 +00:00
Emmanuele Bassi
5b9c6f49c4 Improve the warning message in clutter_main_quit()
If you call clutter_main_quit() without calling clutter_main()

[ South Park ski instructor]

You're going to have a bad time.
2015-01-01 15:07:19 +00:00
Emmanuele Bassi
eb51f6cf10 actor: Do not restore the easing state in finalize()
The easing state is part of the AnimationInfo structure, which is stored
inside the GObject's datalist. Each instance frees the data stored there
during finalization, so there is no point for us to restore an easing
state (which may or may not be the last one) just to have everything
cleared out once we chain up to GObject's own finalize() implementation.
2015-01-01 12:48:39 +00:00
Emmanuele Bassi
d930bdf3fc stage: Use the symbolic constant for event handled
Clarifies the intent for everybody.
2015-01-01 12:45:11 +00:00
Emmanuele Bassi
2034e75658 Use the proper debug category
Backend-related notes should use the `BACKEND` category, not `MISC`.
2015-01-01 12:44:19 +00:00
Emmanuele Bassi
c67dcd59c1 Add proper annotations for the test utilities
This avoids g-ir-scanner complaining.
2014-12-16 13:59:41 +00:00
Emmanuele Bassi
f589b6f63a Revert "bind-constraint: Update the preferred size"
This reverts commit fcc67e99bc.

It seems this causes some recursion overflow in GNOME Shell's usage of
constraints, and needs more investigation.
2014-12-16 13:33:16 +00:00
Emmanuele Bassi
8df2efca6b constraint: Fix update_allocation()'s return value
The update_allocation() method returns TRUE if the allocation was
changed.
2014-12-16 00:46:16 +00:00
Emmanuele Bassi
1fe391606d docs: Add ClutterConstraintClass.update_preferred_size() 2014-12-16 00:38:27 +00:00
Emmanuele Bassi
fcc67e99bc bind-constraint: Update the preferred size
Bind the preferred size of an actor using a BindConstraint to the
preferred size of the source of the constraint, depending on the
coordinate of the constraint.
2014-12-16 00:37:07 +00:00
Emmanuele Bassi
66d48bcca0 actor: Update preferred size using constraints
If an actor has any constraint that may affect its preferred size, then
it should query them when computing its preferred size.
2014-12-16 00:37:07 +00:00
Emmanuele Bassi
391f1d8dd4 constraint: Add the ability to update the preferred size
Constraints can only update an existing allocation, which means they
live only halfway through the layout management system used by Clutter;
this limitation makes it impossible, for instance, to query the
preferred size of an actor, if the actor is only using constraints to
manage its own size.
2014-12-16 00:37:06 +00:00
Emmanuele Bassi
82fffaedb6 constraint: Add a private header
And move the only private ClutterConstraint method to it.

This commit also sneaks in a change that makes sense for the debugging
of the update_allocation() method, which checks if the allocation was
effectively changed.
2014-12-16 00:37:06 +00:00
Emmanuele Bassi
2f490c9dcc build: More out of tree build fixes 2014-12-16 00:15:58 +00:00
Emmanuele Bassi
c337100c14 Use new introspection annotation syntax
Instead of the deprecated one.
2014-12-15 23:45:25 +00:00
Emmanuele Bassi
4f03b32eea actor: Queue a relayout if we use the content's preferred size
In case the ClutterContent changes, and the actor uses the content's
preferred size to drive its own.
2014-12-15 23:39:05 +00:00
Emmanuele Bassi
e2eb0b0ada build: Use subdir-objects 2014-12-15 23:13:30 +00:00
Sjoerd Simons
1be019852f device-manager-xi2: Fix core pointer retrieval race
The core pointer concept doesn't really exist anymore in an XI2 world,
so the clutter API is a bit of a mismatch with what X provides. Using
XIGetClientPointer doesn't really help, as far as i can tell the
semantics of XIGetClientPointer are essentially: Whatever the X server
picked when it had to reply with device-dependant data to a query
without a device specifier. Not very useful...

To make matters worse, whether XIGetClientPointer returns a valid
pointer depends on whether there has been a query that forced it to pick
one in the first place, making the whole thing pretty non-deterministic.

This patch changes things around such that instead of using
XIGetClientPointer to determine the core pointer, we simply pick the
first master pointer device. In practise this will essentially always
be the X virtual core pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=729462
2014-12-15 17:29:52 +00:00
Jonas Ådahl
5281425a53 DeviceManagerXi2: Update cached core pointer in getter if NULL
XIGetClientPointer() may return the device id '0' when called early.
This patch makes pointer cursors work in nested mutter Wayland
sessions again.

https://bugzilla.gnome.org/show_bug.cgi?id=729462
2014-12-15 17:24:59 +00:00
Emmanuele Bassi
b7c4120399 osx: Clean up installed clutter-osx.h header
The installed header should not have private API declarations and
macros. Let's move those into the uninstalled clutter-backend-osx.h
header file instead.
2014-12-15 16:51:05 +00:00
cee1
9efda7eac7 clutter/osx: add clutter_osx_disable_event_retrieval
https://bugzilla.gnome.org/show_bug.cgi?id=719962
2014-12-15 16:47:24 +00:00
Emmanuele Bassi
d005c6a880 script: Do not overwrite ObjectInfo fields
When merging multiple definitions it's possible that the ObjectInfo
fields may get overwritten. Instead of trampling over the fields, we
should reset them only when they actually change — especially the
"is_actor" one, which controls the destruction of the objects when
unmerging happens.

https://bugzilla.gnome.org/show_bug.cgi?id=669743
2014-12-14 23:05:17 +00:00
Emmanuele Bassi
f851d5b985 docs: Add missing deprecation annotations
https://bugzilla.gnome.org/show_bug.cgi?id=709252
2014-12-14 20:27:46 +00:00
Emmanuele Bassi
d546c0c121 actor: Reset the content box when setting a new content
We want to recompute the content box when changing the content instance,
in case the preferred size is different and the content gravity uses the
preferred size; the change of content with different preferred size and
same gravity should also trigger an implicit transition.

https://bugzilla.gnome.org/show_bug.cgi?id=711182
2014-12-13 14:29:30 +00:00
Emmanuele Bassi
1e2132eca4 actor: Bail when setting the same content
No need to do all the work, if the content instance is the same.
2014-12-13 14:28:46 +00:00
Emmanuele Bassi
300aa465c7 actor: Add CLUTTER_REQUEST_CONTENT_SIZE mode
Some actors want to have a preferred size driven by their content, not
by their children or by their fixed size.

In order to achieve that, we can extend the ClutterRequestMode
enumeration so that clutter_actor_get_preferred_size() defers to the
ClutterContent's own preferred size.

https://bugzilla.gnome.org/show_bug.cgi?id=676326
2014-12-13 13:37:05 +00:00
Samuel Degrande
e7d1458298 Easing modes are not used when computing the value of a KeyframeTransition
An easing mode can be set on a frame of a KeyframeTransition.
However, the progress value of the current frame is computed using using
a linear function.
This patch adds a call to clutter_easing_for_mode() to compute
the actual progress value.
Note that parametrized easing modes (bezier and 'step') are not taken
into account.

https://bugzilla.gnome.org/show_bug.cgi?id=740997
2014-12-11 22:37:22 +00:00
Emmanuele Bassi
d2a2e5ba9c Add 1.22 version macros
The 1.22 cycle did start a while ago.
2014-12-11 22:35:13 +00:00
Carlos Garnacho
a0e2ba62a1 x11: Resort to device name matching for non-mt touchpads
If a touchpad is not multitouch, or does not report MT axes (eg. through
the libinput driver), resort to name matching before falling back to
CLUTTER_POINTER_DEVICE.

https://bugzilla.gnome.org/show_bug.cgi?id=741350
2014-12-11 11:48:06 +01:00
Carlos Garnacho
1cabee8d24 evdev: Lookup config to report touchpads as such
Check a touchpad-only setting, and if it returns an expected value there,
the device must be a CLUTTER_DEVICE_TOUCHPAD.

https://bugzilla.gnome.org/show_bug.cgi?id=741350
2014-12-11 11:48:06 +01:00
Carlos Garnacho
a18b2f067b evdev: Prefer pointer/touch devices over keyboard devices
In keyboard/mouse wireless combos, it is rather common for the mouse to
claim it contains the multimedia keys, this makes libinput enable both
the pointer and keyboard capabilities on this device, and Clutter thus
to create a keyboard ClutterInputDevice for it.

Ideally clutter devices should be able to reflect their full capabilities,
or maybe account for the fact that certain events can be sent from
seemingly unexpected device types. But this will bring a somewhat better
behavior on such devices.

https://bugzilla.gnome.org/show_bug.cgi?id=740518
2014-12-11 11:35:56 +01:00
Emmanuele Bassi
8afb499ce5 image: Do not put large textures in the atlas
Atlasing is fine for smaller textures, but once they get too large its
downsides outweight the benefits. At worst, the larger texture will end
up inside its own atlas, but at worst it will require copying and/or
resizing of an existing atlas.

The cut-off at 512x512 pixels is a bit arbitrary, and we can change it
at any point; it would be nice if we could get the texture limit from
Cogl, and then use a fraction of that size as the cut-off limit. Sadly,
that's not portable, and it's not guaranteed to work either.
2014-12-03 12:12:43 +00:00
Emmanuele Bassi
54efcf0e90 gdk: Use non-deprecated GdkCursor API
The non-display safe variant has been deprecated in GTK+ 3.15.
2014-12-03 12:11:55 +00:00
Emmanuele Bassi
7d7eb8aabd gdk: Disable deprecation warnings
We don't want to break the build because GDK deprecated some symbol.
2014-12-03 12:07:06 +00:00
Emmanuele Bassi
3879bacc78 Avoid a compiler warning
Initialize a pointer variable.
2014-12-03 12:05:37 +00:00