Commit Graph

21527 Commits

Author SHA1 Message Date
Carlos Garnacho
754a4bf287 wayland: Implement wl_tablet_tool.set_cursor
Each tool has its own MetaCursorRenderer instance, which is created/destroyed
upon proximity, and possibly updated through focus and set_cursor calls in
between.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
d46586e383 wayland: Implement wl_tablet_tool device event emission
This takes care of the emission of motion/down/up/button, in addition
to the extra distance/pressure/tilt axes.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
38bff73d30 wayland: Add focus management to MetaWaylandTabletTool
Tools can now switch between surfaces, which implies the emission
of wl_tablet_tool.proximity_in/out events.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
aaa59ab6a7 wayland: Initialize the MetaWaylandTabletManager 2016-05-02 12:26:50 +02:00
Carlos Garnacho
dff045963a wayland: Add MetaWaylandTabletManager
This struct keeps the server side information for the wl_tablet_manager
global resource. It keeps the clients requesting this interface, and
does keep track of the plugged tablet devices, so
wl_tablet_manager.device_added is emitted on the expected clients.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
6bbd6d2948 wayland: Add MetaWaylandTabletSeat
This object groups all the tablets/tools pertaining to a given seat.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
2ea01aa428 wayland: Add MetaWaylandTabletTool
This struct holds the server-side information of a wl_tablet_tool, which
represents an specific tool of an specific tablet, and is unique as such.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
1a31721e57 wayland: Add MetaWaylandTablet
This (very basic at the moment) struct keeps server-side information
for wl_tablet resources.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
033c78a7a2 protocol: Generate code for the tablet protocol
This is provided by wayland-protocols
2016-05-02 12:26:50 +02:00
Carlos Garnacho
f1afc604d9 backend: Realize cursor on default MetaCursorRenderer paths
The cursor is realized on x11/native subclasses, but not if a base
MetaCursorRenderer is created.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
c89edb29f9 wayland: Refactor MetaWaylandSurfaceRoleCursor
Move into a standalone meta-wayland-surface-role-cursor.[ch], and
make generic enough to work for pointe and additional (eg. tablet)
cursors.

Most notably, the sprite is now kept completely internal to the
cursor role, and updates are routed through the given
MetaCursorRenderer (which may be the default one for the pointer,
or something else).

The way cursor updates after cursor surface destruction has also
been reworked, the pointer will just keep track of the last cursor
surface, so older surfaces being destroyed don't trigger pointer
rechecks/updates.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
c28fc68df1 wayland: Add MetaWaylandSurface::destroy signal
There's places where it would be convenient to add listeners to this,
so add the signal. The signal is only emitted once during destruction,
it is convenient for the places where we want notifications at a time
the object is still alive, as opposed to weak refs which notify after
the fact.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
5774875ab9 evdev: Avoid updating seat pointer position on tablet events 2016-05-02 12:26:50 +02:00
Carlos Garnacho
422284e0cd evdev: Implement ClutterInputDevice::update_from_tool
This vfunc pokes the libinput_tool in order to find out the currently
available axes, and updates the device as such.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
c72ad23b84 main: Allow updating device axes from the current tool
This way devices are ensured the proper axis status at the time
of processing the events.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
d0d343352c evdev: Implement tablet events
Tablet proximity, motion and button events are translated into ClutterEvents,
and the device state is updated accordingly.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
feff353081 evdev: Implement ClutterInputDeviceTool
This will be backed by a libinput_tool, the type and serial are
fetched from there.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
216298dfad events: Add proximity events
These events will be sent on tool proximity of tablet events.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
efd90eb471 event: Add ClutterInputDeviceTool information to clutter events
These can be used to determine the tool that's being in use for a given event
2016-05-02 12:26:50 +02:00
Carlos Garnacho
63b1a55283 input-device: Add ClutterInputDeviceTool
This is an unique opaque struct that identifies a given tool of
a given device.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
aa0eea9814 enums: Add rotation/slider axes
These will be useful for the tablet tools that have these features.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
fe5f12ddb5 evdev: Map LIBINPUT_DEVICE_CAP_TABLET to CLUTTER_TABLET_DEVICE
This is so tablet devices have the correct ClutterInputDeviceType
2016-05-02 12:26:50 +02:00
Carlos Garnacho
8110197df4 evdev: Pass axis parameters when notifying absolute motion events
This will be useful for tablet support, NULL is given in the current
callers.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
8d290f182a input-device: Disconnect signals on actors where the device has a cursor
Otherwise the signals are left dangling if the device is removed, causing
possible invalid memory accesses afterwards.
2016-05-02 12:26:50 +02:00
Carlos Garnacho
9d06421c1f evdev: Use device name rather than sysname
The device name is something more natural, similar to what's seen
in X11, the sysname is rather the event node basename, which may
also vary depending on device insertion/detection time.
2016-05-02 12:26:50 +02:00
Tiago Santos
6957b5f976 Updated Portuguese translation 2016-04-30 15:17:06 +00:00
Florian Müllner
4a26daea01 Bump version to 3.21.1
Update NEWS.
2016-04-29 16:13:59 +02:00
Florian Müllner
3856622ff7 clutter: Add back support for non-wayland builds
Wayland support is only available on Linux, so keep it optional for
now.

https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-29 16:13:59 +02:00
Florian Müllner
28c9b6e1d7 build: Namespace installed tests of private libraries
Currently our private cogl/clutter forks still install tests as
cogl/clutter, which conflicts with the original libraries.
2016-04-29 14:49:03 +02:00
Florian Müllner
b6092cf4db Revert "build: Set rpath of standalone executable"
Within the mutter module we use the .la file to link cogl/clutter,
so this isn't actually needed.

This reverts commit 576fe6e16b.
2016-04-28 20:15:48 +02:00
Florian Müllner
576fe6e16b build: Set rpath of standalone executable
We now link to cogl/clutter forks in a private location, so make
sure to point the runtime linker to the correct location.
2016-04-28 19:46:05 +02:00
GNOME Translation Robot
502b7e8426 Added Scottish Gaelic translation 2016-04-28 16:22:24 +00:00
Rico Tzschichholz
29752b6b63 cogl/clutter: Drop soname versions of private libraries 2016-04-28 15:34:51 +02:00
Florian Müllner
6e5888853e build: Export correct pkg-config names in .girs 2016-04-28 15:22:50 +02:00
Emmanuele Bassi
0f78357a5f Include libdrm and gbm when building Clutter
Clutter out of tree depends on Cogl's required dependencies via the
pkg-config file. Since Clutter and Cogl moved in tree, it means that
those dependencies need to be checked by Clutter itself, otherwise
headers and libraries won't be found.
2016-04-28 12:41:34 +01:00
Rico Tzschichholz
ba786d4fae clutter/tests/conform: Link against libmutter-cogl as needed 2016-04-28 11:59:05 +02:00
Rui Matos
7b27823004 build: Add cogl and clutter files to POTFILES.skip 2016-04-27 20:47:12 +02:00
Rui Matos
f7ee6caa15 cogl: Fix distcheck 2016-04-27 20:37:47 +02:00
Rui Matos
1fa540bcb7 Fix the merged build
https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-27 20:37:47 +02:00
Rui Matos
3fcbe1d3ec Merge cogl's cogl-1.22 branch into mutter
https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-27 18:36:25 +02:00
Rui Matos
a7b5d790ac Merge clutter's master branch into mutter
https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-27 18:34:03 +02:00
Carlos Garnacho
a6cc35e595 wayland: remove pressed button checks from meta_wayland_pointer_can_grab_surface()
Leave these checks up to the callers, the only uses of this function
(indirect, through meta_wayland_seat_get_grab_info) are
[wl_shell|xdg]_surface.move/resize/show_window_menu.

In move/resize it makes sense to check for a button being pressed, because
we must expect a button release event. However for xdg_surface.show_window_menu
we 1) don't strictly need further events and 2) we must account for press+release
event pairs being processed at once in the compositor before the client sees
the former.

That is eg. the case of touchpad 2nd/3rd button tap emulation, multifinger
taps will emit the event pair at once, so when the client manages to request
xdg_surface.show_window_menu, it'll be too late in the compositor side, so the
request is ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=764519
2016-04-25 14:23:01 +02:00
Jonas Ådahl
08ac192b9d wayland: Handle wl_data_device being destroyed while focused
A wl_data_device object may be created while it is being focused,
either because the client destroyed it or because the client was
destroyed. Handle this by early out in focus handler vfuncs the case
where it was destroyed, so that we don't corrupt memory and/or cause
segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=765062
2016-04-25 20:17:24 +08:00
Rui Matos
2d2835f02a move everything into a cogl/ directory 2016-04-22 16:44:31 +02:00
Rui Matos
e6b14a36c5 cogl: make library private to mutter 2016-04-22 16:39:46 +02:00
Rui Matos
335643ee86 prune out non library bits 2016-04-22 16:39:46 +02:00
Rui Matos
d6dd55171a build: get rid of specialized makefile snippets 2016-04-22 16:39:46 +02:00
Rui Matos
26c94951fc disable standalone builds and drop private glib copy 2016-04-22 16:39:46 +02:00
Rui Matos
9504eac68c po: drop translations 2016-04-22 16:39:45 +02:00
Rui Matos
a9e1130244 drop examples 2016-04-22 16:39:45 +02:00