Commit Graph

6024 Commits

Author SHA1 Message Date
Emmanuele Bassi
115104db8c cally: Remove docbook tags 2014-03-17 23:05:09 +00:00
Emmanuele Bassi
8fc47244b0 build: Remove abicheck.sh
We now control the visibility of symbols directly from the header files,
so we always have the correct ABI.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
386be83f24 New visibility handling in Clutter
Instead of listing every public symbol inside an ancillary file, we can
use compiler annotations. This scheme is also used by GLib and GTK+.

The symbols file is left in tree until the Visual Studio rules are
fixed, but it's not used any more during distcheck.

I double-checked that the exposed ABI is the same before and after this
change, except for symbols that were never meant to be public in the
first place, and that escaped our attention when we generated the first
version of the symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
5c4c2aa52f symbols: Fix the expected ABI
Some symbols that were never meant to be exported ended up in the
symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
3b21999494 Use _CLUTTER_EXTERN to define CLUTTER_VAR
The macro is defined outside of the header, and does all the heavy
lifting of getting the proper attributes.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
c44f73a7f1 Include "config.h"
Otherwise the symbol annotation won't be expanded correctly.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
53a86e91d9 Annotate symbols in backend-specific headers
Like we did for the rest of the API.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
66826bc6ba Annotate symbol visibility in Cally
Like we did for the main library.
2014-03-17 19:26:27 +00:00
Emmanuele Bassi
c69bb976b3 Annotate all public symbols
We are going to switch to compiler annotations to determine the
visibility of the symbols.
2014-03-17 18:53:27 +00:00
Rui Matos
e70a0109f2 Avoid needless event copies when queueing from a backend to a stage
All backends follow the same pattern of queueing events first in
ClutterMainContext, then copying them to a ClutterStage queue and
immediately free them. Instead, we can just pass ownership of events
directly to ClutterStage thus avoiding the allocation and copy in
between.

https://bugzilla.gnome.org/show_bug.cgi?id=711857
2014-03-15 19:44:57 +00:00
Emmanuele Bassi
572504db4d Edit an incorrect comment
The location of the cool-off handling of clipped redraws has been moved
to clutter-stage-x11.c a long time ago (commit 1b1e77b4).
2014-03-15 19:31:54 +00:00
Jasper St. Pierre
79ece182dc egl: Only expose clutter_egl_set_kms_fd if we have KMS support
And only call the proper Cogl functions in that case, too. This
fixes the build on platforms without KMS, like the BSDs.

https://bugzilla.gnome.org/show_bug.cgi?id=726198
2014-03-15 19:09:55 +00:00
Jonas Ådahl
a4440b718d wayland: Keep track of button modifier state
Keep track of the button modifier mask state in
ClutterInputDeviceWayland and push its state to new button events going
out.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=708781
2014-03-14 18:24:03 -04:00
Jasper St. Pierre
a96daf82c2 egl: Add a way to set the KMS FD
This is needed for the logind integration work, where logind will
send us an already-opened FD to KMS.

https://bugzilla.gnome.org/show_bug.cgi?id=726198
2014-03-14 14:12:26 -04:00
Adel Gadllah
06387c3fd7 stage-cogl: Fix feature check in clutter_stage_cogl_redraw
We do not strictly require the 'swap-region' Cogl feature in order to use
clipped redraws: they work equally well with just the 'buffer-age' Cogl
feature.

https://bugzilla.gnome.org/show_bug.cgi?id=726313
2014-03-14 17:56:40 +01:00
Adel Gadllah
f649d732f9 clutter-stage-wayland: Enable clipped redraws
_clutter_stage_window_can_clip_redraws is used to check for clipped redraws
support but can_clip_redraws is not implemented by clutter-stage-wayland so
it always returns FALSE causing full screen redraws.

Fix that by implementing can_clip_redraws in clutter-stage-wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=726315
2014-03-14 17:56:13 +01:00
Adel Gadllah
e4497baaf0 eglnative: Add clutter-stage-window implementation
Add a ClutterStageEglNative implemennation that implements
can_clip_redraws so that clipped redraws can work
on eglnative.

https://bugzilla.gnome.org/show_bug.cgi?id=726341
2014-03-14 17:55:19 +01:00
Jasper St. Pierre
dcaf5686a2 evdev: Always create the main seat
There could be times when we may not necessarily see a device appear
at initialization time, like when we're VT switched away when we
initialize, and thus we can't ever rely on a main seat appearing.

Always create a main seat with logical pointer/keyboard devices, and
tie the first physical seat that comes in to the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:28 -04:00
Jasper St. Pierre
defe55ff09 evdev: Extract code for setting the libinput seat out
We're going to create the main seat at an earlier time, when
we don't have the physical libinput_seat yet, so we need to
do the association later.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:28 -04:00
Jasper St. Pierre
5facd710c8 evdev: Set the initial pointer position for all pointer devices
Rather than just those on the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:27 -04:00
Jasper St. Pierre
e23f77f1e6 evdev: Extend the device open callback with a close callback as well
We need to return the device to logind with ReleaseDevice().

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:27 -04:00
Emmanuele Bassi
aa5a4e9e3c stage: Use the correct types for debug note 2014-03-12 19:30:04 +00:00
Bastian Winkler
70835c904a 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:30:40 +01:00
Chun-wei Fan
c1fd29df7a 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:35:50 +08:00
Chun-wei Fan
acd7d9555c Fix Build of clutter-test-utils.c on Windows
The use of "environ" clashes with a #define in Window's stdlib.h, at least
on Visual Studio, so fix the build by prefixing environ with test_.

https://bugzilla.gnome.org/show_bug.cgi?id=725716
2014-03-08 18:35:49 +08:00
Emmanuele Bassi
c73f45ca7c text: Use the keymap direction when focused
If the ClutterText actor has key focus then we should ask for the
direction of the key map, instead of the direction of the actor.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
3209129d6b x11: Add keymap direction query
We should use the Xkb API to query the direction of the key map,
depending on the group. To get a valid result we need to go over
the Unicode equivalents of the key symbols for each group, so we
should cache the result.

The code used to query and cache the key map direction is taken
from GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
a000349978 backend: Add private accessor for the keymap direction
We need to ask the backend (wherever possible) for the direction of the
current keymap.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
6faf6dfe42 text: Use the resolved text direction
Now that we compute the effective text direction when creating the Pango
layout, we should also use it when painting it.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
50b6b59d02 text: Discover the direction of the contents
We should set the direction on the PangoContext when creating a
PangoLayout based on a best effort between the contents of the text
itself and the text direction of the widget, in case that fails.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Jasper St. Pierre
9b097eb4d8 device-manager-evdev: Make sure to reset released when reclaiming devices
Otherwise, Clutter will tell us that we forgot to call reclaim_devices
the next time we call release_devices... but we didn't!
2014-03-03 11:57:58 -05:00
Adel Gadllah
4a3ad9c3af DeviceManagerXi2: Cache the client pointer
Currently clutter_device_manager_xi2_get_core_device always
does a round trip to query the client.

So avoid that by caching the client pointer and only update it when the
xi devices change.

https://bugzilla.gnome.org/show_bug.cgi?id=725561
2014-03-03 15:06:11 +01:00
Jasper St. Pierre
fdd553d2a9 evdev: Kill compile warning 2014-02-28 09:50:36 -05:00
Rui Matos
64508e48b6 evdev: Add missing CLUTTER_AVAILABLE_IN_* annotations 2014-02-27 11:31:34 +01:00
Rui Matos
2c9a4fd220 evdev: Add missing 'Since' and 'Stability' doc tags 2014-02-27 11:31:34 +01:00
Rui Matos
458de1178d evdev: Set the initial core pointer coordinates to a sane value
ClutterInputDevice's default initial coordinates is (-1, -1) and since
they're updated from events in a relative way it means that the
pointer can go outside the stage right from the first event.

We usually let this up to higher layers to fix through the pointer
constraint callback but that doesn't work if the first event doesn't
put the pointer immediately inside the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=725103
2014-02-27 11:31:33 +01:00
Rui Matos
d67b38f960 evdev: Make the keymap available
Make the keymap available so that consumers don't have to duplicate it
if they need it.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
2014-02-27 11:31:33 +01:00
Rui Matos
2a7d5503d8 evdev: Don't update xkb state with pressed keys on keymap change
Doing so is unlikely to work reliably. Instead, switching the keymap
should be done at a time when no key is currently pressed down, but
let's leave that task to higher level code.

This allows us to remove key state tracking at yet another level in
the stack since higher level code likely already tracks this for other
purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
2014-02-27 10:59:16 +01:00
Rui Matos
945ee5764a evdev: Keep latched and locked modifier state when switching keymaps
https://bugzilla.gnome.org/show_bug.cgi?id=725102
2014-02-27 10:59:15 +01:00
Rui Matos
a6bd53ec42 evdev: Implement keyboard repeat
The kernel keyboard repeat functionality isn't configurable and
libinput rightfully ignores it.

This implements keyboard repeat in userspace allowing for consumers to
set the initial delay and repeat intervals.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
2014-02-27 10:59:15 +01:00
Rui Matos
133f95fd0d evdev: Add a conditional define guard to expose API
The evdev backend has always been excluded from Clutter's API
stability guarantee though in an informal way. This commit makes it
explicit by forcing users to define CLUTTER_ENABLE_COMPOSITOR_API.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
2014-02-27 10:59:15 +01:00
Jonas Ådahl
dacb515e27 evdev: Port evdev input backend to libinput
Instead of having its own evdev input device processing implementation,
make clutter's evdev backend use libinput to do input device processing
for it.

Two GObject parameters of ClutterInputDeviceEvdev (sysfs-path and
device-path) are removed as they are not used any more.

Before ClutterDeviceManagerEvdev had one virtual core keyboard and one
virtual core pointer device. These are now instead separated into seats,
which all have one virtual core keyboard and pointer device respectively.

The 'global' core keyboard and pointer device are the core keyboard and
pointer device of the first seat that is created.

A ClutterInputDeviceEvdev can, as before, both represent a real physical
device or a virtual device, but is now instead created either via
_clutter_input_device_evdev_new() for real devices, and
_clutter_input_device_new_virtual() for virtual devices.

XKB state and button state is moved to the seat structure and is thus
separated per seat. Seats are not a concept exposed outside of clutter's
evdev backend.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=720566
2014-02-27 09:57:29 +01:00
Carlos Garnacho
488639eb63 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:18:20 +01:00
Adel Gadllah
2639395533 stage-cogl: Fix buffer_age code path
Currently we where checking whether the damage_history list contains
more or equal then buffer_age entries. This is wrong because we prepend
our current clip to the list just before the check.

Fix that to check whether we have more entries instead of more or equal.

https://bugzilla.gnome.org/show_bug.cgi?id=724788
2014-02-20 12:00:20 +01:00
Emmanuele Bassi
8935ee4a78 Add missing exported symbols 2014-02-19 13:04:09 +00:00
Adel Gadllah
197d170364 stage_cogl: Don't scale the current_damage when adding to the damage_list
Otherwise we will union the scaled rectange with the clip_region which is
unscaled causing us to redraw a larger area.
2014-02-14 13:16:52 +01:00
Bastien Nocera
32b3d27bb9 GestureActions: Add per-action thresholds
Instead of relying on the dnd drag threshold, add per-action
horizontal and vertical thresholds. Use them in the swipe action
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=724242
2014-02-13 18:53:24 +01:00
Bastien Nocera
54e2657cb0 GestureActions: Set threshold-trigger-edge at right time
It was set during the _init(), and swiftly overridden with the
default value in construct. Do it in constructed() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=724242
2014-02-13 18:53:24 +01:00
Emmanuele Bassi
f73b4d334a actor: Extend :scale-[xyz] factors in the negative range
The corresponding methods accept negative values already.

https://bugzilla.gnome.org/show_bug.cgi?id=706311
2014-02-10 18:35:12 +00:00
Emmanuele Bassi
dd08b6fd98 docs: Explicitly mention that Transition is abstract
https://bugzilla.gnome.org/show_bug.cgi?id=710232
2014-02-10 18:32:36 +00:00