Commit Graph

134 Commits

Author SHA1 Message Date
Bryce Harrington 6a5695b465 elput: Document how keyboard events are processed
Summary:
Add some light function docs and code comments to explain the steps
followed in processing hardware events for keyboard hits into actual
printable characters.  While this is internal functionality, the process
is important and involves a couple external dependencies (libinput and
libxkbcommon) so documenting this flow may help future developers avoid
introducing bugs.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4953
2017-06-09 14:35:51 -04:00
Jean-Philippe Andre f2783b4332 elput: Fix compilation warning (GCC)
Use GCC sematic {} instead of {0} as the array members are structs,
thus {0} isn't valid either.
2017-06-09 11:53:47 +09:00
Chris Michael 26af19b543 elput: Add API function to swap dx & dy axis from pointer motion event
Small patch which adds an API function that can be called to swap x
and y axis and invert them according to rotation angle.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:03:36 -04:00
Chris Michael 75b5310781 elput: Minor formatting fixes
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:03:30 -04:00
Chris Michael 06b8a76954 elput: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:03:06 -04:00
Chris Michael d43bc13e76 elput: Get touch event slots using slot not seat_slot
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:01:52 -04:00
Bryce Harrington e1fbde9e5b elput: fix sp. usefull
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4935

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:04:43 -07:00
Mike Blumenkrantz bc346d367f elput: send extra pointer motion event on first button press after resume
ensure state is reapplied by other components
2017-06-02 18:23:43 -04:00
Mike Blumenkrantz f220f086b9 elput: move pointer coords into seat struct
@fix
2017-06-02 18:23:43 -04:00
Mike Blumenkrantz 36dcd5719a elput: ref evas devices in event structs 2017-06-02 18:23:43 -04:00
Mike Blumenkrantz 4c7c613e76 elput: add refcounting for seats/devices
ensure lifetimes persist through events

@fix
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz 8d08119fdd elput: add null checks for xkb compose pointers
somehow these can fail to be created
2017-06-02 18:23:42 -04:00
Derek Foreman b53d1e29f1 elput: Fix logind session object path
We're supposed to query the path for a session id instead of just
making up the string ourselves.

Fixes all input devices being dead after a vc switch for some users.
2017-05-31 14:16:36 -05:00
Mike Blumenkrantz 6e1a52fc7d elput: do not set TABLET_PAD to have POINTER caps 2017-05-26 16:27:43 -04:00
Mike Blumenkrantz d725ae5a0a elput: fallback to regular device name if output_name is not available 2017-05-26 16:27:43 -04:00
Mike Blumenkrantz ed4e54ebe2 wayland/drm: create evas_devices and add device pointer to input events
this is still semi-broken if a seat has many pointer-ish type devices since
pointer devices in ecore-evas were never correctly implemented to be 1:1 with
seat:cursor relationships

@feature
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz d4ce9b1ac3 elput: store output w/h and apply to devices on creation
fix async device initialization for devices which need this (e.g., touchpads)

@fix
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz cf6fc05610 elput: add more elput_seat accessor apis 2017-05-26 16:27:43 -04:00
Mike Blumenkrantz b09c6f1f3e elput: start elput_device_ and elput_seat_ namespaces, rename some functions 2017-05-26 16:27:43 -04:00
Mike Blumenkrantz e34088d74e elput: rename and make public Elput_Device_Caps enum 2017-05-26 16:27:43 -04:00
Mike Blumenkrantz e8fe0bcc47 elput/drm: redo xkb context/keymap setting
context and keymap need to be set at the same time in order to effectively
update keyboard state, and active group should be accessible through api
as well

preserve old function ABI to ensure old binaries don't crash
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 6ddcd48fde elput: implement compose sequences
@feature

fix T5006
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz f7ae2a7de8 elput: fix key/keyname strings in key events
todo: move all this duplicated code somewhere
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 53157f4a4f elput: sync _keyboard_keysym_translate() with ecore-wl2 code, add copyright 2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 9f217eb0f6 elput: add copyright from weston 2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 140a3d668c elput: handle double/triple click for pen events 2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 03e23322d5 elput: send axis events for tablet tools 2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 7cc52ef27b elput: add initial input tablet support
@feature
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz dc61c2e80f elput: use unrounded coords for subpixel struct members in events
@fix
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz ba1ab3a8b1 elput: store device pressure for use in events 2017-05-26 16:27:42 -04:00
Mike Blumenkrantz 679872a800 elput: group tablet input devices into pointer devices
this is consistent with x11 behavior as well as the behavior of other toolkits
under wayland

@feature
2017-05-26 16:27:42 -04:00
Chris Michael 8eb1e925ae elput: Remove specific case for pointer wheel tilt
Since efl-jenkins does not have libinput >= 1.7.0, this commit broke
the jenkins build due to missing
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT value. We should be able to
get by with letting 'default' case handle it....

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-19 14:13:29 -04:00
Chris Michael 642e7357f8 elput: Add case for wheel tilt when getting pointer axis value
libinput >= 1.7.0 added support for
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT, however we do not yet support
that in elput, thus gcc was spilling a warning about an unhandled
enumeration value here. We'll add a case for the above, plus a default
to cover any future additions.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-19 13:16:57 -04:00
Chris Michael 0e6cd3fbf5 elput: Remove unused variable
Gcc reports 'flags' as unused here, so remove it

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-19 13:15:02 -04:00
Cedric BAIL b12311804f elput: use new API eina_file_close_on_exec. 2017-04-18 16:56:56 -07:00
Cedric BAIL c91b4c7065 elput: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Carsten Haitzler 0356b1eb5e vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings
and use the vpath string resolving feature to avoid
printfs/strjoins/cats etc. etc. as well.

also remember to remove old name string from evas shm code - it worked
for me. i guess i was lucky and it happened to be NULL thus free was
fine.
2017-02-10 19:27:15 +09:00
Derek Foreman 2800038ee2 Revert "vpath usage - simplify to bare minimum to make gustavo happy"
This reverts commit 2037474dc0.

This causes the wayland_shm engine to seg fault immediately at
startup when attempting to create shm buffers.

Please make sure when committing changes to the wayland_shm engine to
test on intel, exynos, and at least one platform without dmabuf
capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var
to disable dmabuf on intel or exynos.

Anyone without the time or hardware to fully test changes to wayland_shm
can submit a patch to phabricator and assign it to me so I can fully
test it before landing.
2017-02-09 09:17:38 -06:00
Carsten Haitzler 2037474dc0 vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings and use the
vpath string resolving feature to avoid printfs/strjoins/cats etc.
etc. as well.
2017-02-09 22:06:16 +09:00
Carsten Haitzler 8e959890e7 elput - use vpath to get xdg runtime to also be setuid safe
this time around... use a / at the end of the (:run:) virtual dir
path to make it work.
2017-02-09 09:28:47 +09:00
Derek Foreman 62a22fd401 Revert "elput - use vpath to get xdg runtime to also be setuid safe"
This reverts commit 24e34e19a1.

This broke keyboard input for the enlightenment wayland compositor,
please test elput changes on at least one of the drm backends,
preferably with enlightenment.

The wayland compositor is hard enough to keep stable due to breakage
from core changes only tested on X - but elput's main user is our
wayland compositor, was this tested anywhere?
2017-02-08 09:47:33 -06:00
Derek Foreman 53cc1eab04 Revert "elput: Minor formatting fix"
This reverts commit 95d93cb720.

Formatting change on top of a totally untested coverity fix that
breaks input for enlightenment's wayland compositor.

 #TeamworkIsDeprecated
2017-02-08 09:47:32 -06:00
Chris Michael 95d93cb720 elput: Minor formatting fix
NB: No functional changes, just some minor formatting adjustments

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-08 08:29:24 -05:00
Carsten Haitzler 24e34e19a1 elput - use vpath to get xdg runtime to also be setuid safe
this fixes CID 1357168 in the case of setuid binaries as vpath handles
setuid cases.
2017-02-08 21:19:39 +09:00
Derek Foreman b04fa2ddba elput: Fix async input shutdown during init
By only checking if the thread was cancelled *after* sending feedback
to the main thread we ended up claiming all the devices libinput
asked for in a way that never allowed them to be released

(how the hell can a cancelled thread send feedback?)
2017-02-07 16:53:09 -06:00
Chris Michael 60859b4789 elput: Delete output_name stringshare on error case
This actually should have been part of the previous patch which moved
setting output_name to evdev, but it got missed so add it now. This
ensures we cleanup the output_name stringshare on error.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 12:00:15 -05:00
Chris Michael 6bd8313f02 elput: Remove dead FIXME note
As device calibration has already been handled via external facing
API, this FIXME note is no longer needed.

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 11:34:57 -05:00
Chris Michael 661c19a514 elput: Set device output name when device is created
Small patch to set the output name of an Elput_Device when the device
gets created. Note, this was already being done inside elput_input,
but this patch moves it to when the device gets created.

NB: Really no functional changes here, just moving a function call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 11:33:25 -05:00
Mike Blumenkrantz 9a8931c3de elput: add event for relative motion
@feature
2017-02-03 15:13:57 -05:00
Chris Michael e483e35f3d elput: Improve debug output for added devices
Small patch which does not print out debug info for devices we do not
handle, and adds the 'type' of device to the debug output (pointer,
keyboard, etc).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-31 10:55:55 -05:00