Commit Graph

21773 Commits

Author SHA1 Message Date
Carlos Garnacho
7e3f96d972 backends: Prepare for virtual devices
Those have no backing libinput_device, and configuration does not
apply to those.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:26 +02:00
Carlos Garnacho
5f91d34f88 clutter/evdev: Implement ClutterVirtualInputDevice::notify_keyval
This is somewhat gross at the moment, because we're after all mimicking
real keyboard events, we can only lookup keycodes that are available
in the current map, and the control of levels is rather limited.

Eventually, we want to implement the text_input protocol, handle these
events separately to MetaWaylandKeyboard, so event->key.keyval is
is guaranteed to be the final result. Until then, this is the farthest
we can get.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:26 +02:00
Carlos Garnacho
d0a708b42c clutter: Add ClutterVirtualInputDevice vmethod to notify keysyms
Evcodes don't cut it when we have something already specifying the
character to be printed, despite the current group/level. This API
allows some more control on the intended output.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:26 +02:00
Carlos Garnacho
d940d5e581 clutter: Make ClutterVirtualInputDevice public
This includes adding documentation and introspection annotations,
and marking the functions as extern.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:26 +02:00
Carlos Garnacho
70f69e5de4 clutter/evdev: Allow specifying the ClutterInputMode of virtual devices
The seat core keyboard/pointer will be "master", the ones created through
ClutterVirtualInputDevice will be "slaves".

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
c2ce0e6795 ClutterVirtualInputDeviceEvdev: Forward button and key presses
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
adbd566f83 ClutterSeatEvdev: Keep track of button count
libinput does it for us, but only for physical devices. When we add
virtual devices to the same seat, we need to track button press count
ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
f511f65a14 ClutterVirtualInputDeviceEvdev: Forward motion events
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
0942d68f1a ClutterVirtualInputDeviceEvdev: Create associated ClutterInputDevice
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
73d5d837db ClutterVirtualInputDeviceEvdev: Construct with a specific seat
We are still single seated, so until we are properly multi seated its
always the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
ea5b691ac6 ClutterVirtualInputDevice: Store the device type
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
53d1b11386 clutter/evdev: Move keyboard and pointer notification into seat
We notify per seat; so lets move the logic there. Touch and tablets to
follow later.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
85e8feca67 ClutterVirtualInputDevice: Keep track of the device manager
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
fb47374629 ClutterDeviceManagerEvdev: Split out seat into a separate file
Split out ClutterSeatEvdev functionality into a separate file.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Jonas Ådahl
9a92d5fe89 clutter: Add virtual input device API
Virtual input devices aim to enable injecting input events as if they
came from hardware events. This is useful for things such as remote
controlling, for example via a remote desktop session.

The API so far only consists of stumps.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-07-26 18:45:25 +02:00
Daniel Mustieles
337b833e23 Updated Spanish translation 2016-07-26 11:01:00 +00:00
Piotr Drąg
d25af2a02a Add Language headers to po files
Future versions of gettext will fail if this header is missing.
2016-07-24 21:38:40 +02:00
Jonas Ådahl
820a6ab406 Gracefully exit with failure if backend creation failed
Instead of continuing eventually crashing with a segmentation fault due
to a missing renderer, make MetaBackend an GInitable, and gracefully
handle the failure to fully create the backend with an EXIT_FAILURE.

https://bugzilla.gnome.org/show_bug.cgi?id=769036
2016-07-23 21:21:31 +08:00
Jonas Ådahl
cd225c4e19 Always use the default screen
GDK doesn't support multiple screens, so effectively we don't either.
Lets stop pretending we do.

This fixes a few -Wdeprecated warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
Jonas Ådahl
98cd8136ca MetaWindowWayland: Don't set X11 window attributes that'll get ignored
We only use a handful of the attributes set, so lets stop pretending
that things are initialized for a reason. Eventually we should stop
using XWindowAttributes in the generic MetaWindow creation path.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
Carlos Garnacho
e6972924d0 configure: Lower minimum libwacom version
We don't need such a recent libwacom. The tablet descriptions in
newer libwacom versions are welcome, but is nothing mutter
directly relies on.
2016-07-22 23:47:06 +02:00
Florian Müllner
ead09bf6cc wayland: Shut up a compiler warning
If the compiler cannot figure out that the condition for setting
the dev variable is the same as the condition for accessing it,
it will complain about potential uninitialized use.
2016-07-22 23:21:30 +02:00
Florian Müllner
fe09a3c4e2 backends: Add missing guards to libwacom calls 2016-07-22 23:20:47 +02:00
Carlos Garnacho
ee6867611f configure: Bump gsettings-desktop-schemas/wayland-protocol versions
Those versions are required for tablet v2 protocol support.
2016-07-22 19:03:12 +02:00
Piotr Drąg
207c11d1f7 Updated POTFILES.in 2016-07-22 15:03:16 +02:00
Carlos Garnacho
c6beb1cfc5 wayland: Emit wp_tablet_pad_group.buttons after focus changes
The buttons grabbed by the compositor might have changed in between,
so just broadcast the button array again.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
b34fe72bb7 wayland: Check serial on wp_tablet_pad.set_feedback
We must lookup the mode switch serial for the group where the button
belongs to. Also, avoid the changes if the client requests setting
the feedback for buttons owned by the compositor.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
18f301cec9 wayland: Export function to tell whether a button belongs to a pad group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
406677e2a0 wayland: Check serial on wp_tablet_pad_strip.set_feedback 2016-07-22 13:31:09 +02:00
Carlos Garnacho
4f25057413 wayland: Check serial on wp_tablet_pad_ring.set_feedback 2016-07-22 13:31:09 +02:00
Carlos Garnacho
2f492c133c wayland: Fix label lookup on >1 strips/rings
We assumed that each group could only have 1 strip and/or ring, because
accounting is performed per group, so we could not assume the real
index for anything above 1. Get rid of this restriction, now that
MetaWaylandTabletPad does its own accounting of rings/strips, alongside
groups.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
138a47b8f9 wayland: Move strips/rings management back to MetaWaylandTabletPad
This is best for 2 reasons:
- It's feels cleaner doing first creation of rings/strips and then
  the group assignment. The other option is making groups iterate
  other all rings/strips and selectively skip those not meant for
  it, which sounds somewhat redundant.
- Some minimal accounting of rings/strips without group restrictions
  is needed for meta_wayland_tablet_pad_get_label().

The rings/strips memory is now owned by MetaWaylandTabletPad instead
of groups, which is sort of meaningless since all are meant to go
at the same time.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
62e4954c96 wayland: Add method to relate a pad strip to its group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
062b696df2 wayland: Add method to relate a pad ring to its group 2016-07-22 13:31:09 +02:00
Carlos Garnacho
5effde59f6 backends: Implement the "show osd" pad action
Just call back into meta_display_request_show_osd().
2016-07-22 13:31:09 +02:00
Carlos Garnacho
76595af8af core: Add special case for the pad OSD in event handling
When it's active, we want wayland to stop handling (most notably key)
events.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
21c8911254 core: Add meta_display_request_pad_osd() function
There may be external/compositor-specific reasons to trigger the
pad OSD. Expose this call so the pad OSD can be triggered looking
up the right settings, monitor, etc...
2016-07-22 13:31:09 +02:00
Carlos Garnacho
35554555e0 core: Add MetaDisplay:show-pad-osd signal
This is intended to be caught in the gnome-shell code, in order to
show the OSD with the pad action mapping.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
e2ad8700a9 backends: Export function to query the mapped MetaMonitorInfo of a tablet
Or NULL if the tablet is mapped to the full desktop size.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
323c608b0c backends: Export call to retrieve the base GSettings for a tablet 2016-07-22 13:31:09 +02:00
Carlos Garnacho
0efe076a0a backends: Implement "switch monitor" pad button action
This action remaps the tablet to each of the connected monitors,
or to the span of all monitors.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
6f7f98540f core: Add public MetaDisplay functions to get action labels for pad buttons
This API will be used from the gnome-shell pad OSD implementation, in order
to show the actions that currently apply to every button/ring/strip in the
tablet.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
56632d2ef7 backends: Add function to retrieve the label for a pad button action
As those are specified by settings.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
6296d30e1a wayland: Add getters for the current feedback strings in MetaWaylandTabletPad
Each of the buttons/rings/strips may have one such feedback string, this API
makes is meant to make lookups consistent.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
ed16b40c98 meta: Add MetaPadActionType enum
This will be used on lookups to the current action assigned to
any element in a tablet pad.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
7bba20e536 wayland: Hook MetaWaylandTabletPad to pad button actions management
These are handled by the MetaInputSettings, so hook the events emitted
to it.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
8e6244238d backends: Add API to trigger actions related to pad buttons
It does nothing at the moment, but can be hooked into MetaWaylandTabletPad
now. For X11, we need to trigger these for the pad events we receive from
the passive pad button grabs.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
ba9ec00694 wayland: Add update() phase to MetaWaylandTabletPad
This will be needed to update internal state of pad groups.
2016-07-22 13:31:09 +02:00
Carlos Garnacho
08cda496f8 wayland: Apply pressure settings before sending wp_tablet_tool.pressure 2016-07-22 13:31:09 +02:00
Carlos Garnacho
f9552bb9c0 backends: Add function to apply pressure sensitivity to tablet tools
A bezier curve is created out of the 2 control points in settings, so
the pressure is made to follow the stablished curve between 0 and 1.
2016-07-22 13:31:09 +02:00