Commit Graph

173 Commits

Author SHA1 Message Date
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Christopher Michael 6e48257b79 elput: Remove useless call to eldbus_message_unref
If we are returning here due to a failure to create the eldbus
message, then there is no point in trying to free it as it is already
null.

@fix
2019-04-23 09:14:52 -04:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Christopher Michael a6c3be1351 elput: Update doxygen parameters
NB: No functional changes
2019-01-31 08:45:42 -05:00
Michaël Bouchaud (yoz) ebc84e82ac elput: Add API to allow settings tap-to-click on pointer device
Summary:
Add a way to configure pointer device with tap-to-click features.

@feature

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7843
2019-01-31 08:39:41 -05:00
Christopher Michael 7fcb3f5db1 elput: Verify pointer device is accel capable before setting speed
As we cannot set mouse accel speed unless an input device is capable,
we add a small test here to check that it supports acceleration.
2019-01-02 14:55:13 -05:00
Chris Michael 422960b0e6 elput: Add elogind as meson option 2018-11-29 07:13:16 -05:00
Chris Michael 90831021bc elput: Fix ifdef check to support elogind also 2018-11-29 07:05:47 -05:00
Chris Michael 04b2fedee9 elput: Fix ifdef check to work for elogind also 2018-11-29 07:05:47 -05:00
Chris Michael d6bbfc5ada elput: Add include flie for elogind support 2018-11-29 07:05:47 -05:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Chris Michael df13fb4a70 elput: Remove unused and useless event type
f220f08 introduced this event, however this event never gets raised or
used. I believe this was an accidental inclusion.

'#betabreak'

Reviewed-By: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-07-17 22:39:50 -04:00
Marcel Hollerbach bda4565d9c ecore_wl2&elput: correctly fill the key structure
Summary: the key structure has two fields key and keyname, those should be identical to the keystructures from x. the method xkb_keysym_to_utf8 however returns different values for keys like "minus" thus only relying on xkb_keysym_name files this issue.

Reviewers: eagleeye, devilhorns

Reviewed By: eagleeye

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6520
2018-07-10 14:44:36 -04:00
Mike Blumenkrantz 55441e82e2 elput: include Eina.h in public header
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:27 +02:00
Carsten Haitzler db6e4622af elput - don't segv on shutdown when libinput dispatch happens to free lib 2018-02-26 00:36:17 +09:00
Chris Michael 382e1a8957 elput: Fix null pointer dereference
Coverity reports this as a null pointer dereference, so check for
'seat' existence before comparing with strcmp

Fixes CID1385369

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-01-23 07:00:19 -05:00
Chris Michael 4e2406ed3b ecore_drm2: Only use a virtual terminal on seat0
Summary: Only seat0 supports virtual terminals.

Test Plan: Make sure enlightenment does not error out on non-seat0 due to a virtual terminal error. Enlightenment will not start yet on seat1 with this alone

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: ManMower, devilhorns, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5710
2018-01-22 11:25:15 -05:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Carsten Haitzler b461830e64 elput - fix crash on shutdown where input.lib was NULL
this was null checked everywhere except in 1 place. fix. now more
crash on shutdown now
2018-01-17 18:14:51 +09:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Chris Michael 2e1806521e elput: Remove unreachable code
As we are returning the evdev above, this block is unreachable so
remove it.

Fixes Coverity CID1382857

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-20 07:51:50 -05:00
Carsten Haitzler f40c91941d libinput check - move up to requiring 1.6 as a minimum for libinput 2017-11-12 21:47:02 +09:00
Carsten Haitzler 1e83d963d9 elput - ref device that is in the event queue 2017-11-09 11:42:29 +09:00
Carsten Haitzler 7a7abb043a elput - re-enable switches (power buttons, lid etc.)
this is needed for devices that no longer produce aspi events for
these. otherwise good luck getting any event on lid open/close or on
pressing the power button. this also stops hiding switch events from
libinput and now you can get switch events to find lid or tablet mode
switching changes.

@fix
2017-11-08 20:37:50 +09:00
Chris Michael fa2faff41b elput: Fix issue of pointer rotation not being set on startup
elput_input_pointer_rotation_set may be getting called before input
devices are actually added, so we need to be able to set pointer
rotation when a device actually gets added.

To fix this, we will store the requested input rotation value, and
apply it at the time of input device creation.

NB: The current case is that the wl_drm module will apply existing
output rotation before Input has completely initialized, thus any
calls to set the pointer rotation there will not succeed as input
devices have not been created yet.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-03 14:14:04 -04:00
Chris Michael d798eca247 elput: Add API to set pointer acceleration speed
Small patch to add an API which can be called to set pointer
acceleration speed under Wayland.

ref T4736

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-24 11:28:31 -04:00
Mike Blumenkrantz dc073c1ea3 wayland: fix num/caps lock handling in events
locks are not the same as modifiers, and the corresponding event flag must
be set based on whichever value(s) are set instead of yolo mixing and matching

@fix

ref T5737
2017-08-18 15:24:37 -04:00
Bryce Harrington e3e2a37b0f elput: Fix @brief's in docs
Summary:
It is not necessary to specify @brief since the first line will
automatically be used, but if it is used it should be only for the brief
description, not the detailed description.

Also reformat other docs in this file to follow convention for the brief
docs.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5101
2017-08-17 10:41:26 -04:00
Derek Foreman 33439865de elput: Fix synthetic relative motion events based on abs events
libinput won't actually give us this info, and logs an error instead.
We can't synthesize based on pointer position due to pointer
warping.

So we must track abs reports and use previous abs reports to
synthesize rel events.
2017-07-28 16:48:38 -05:00
Mike Blumenkrantz d529d6def6 elput: fix seat cleanup
ensure seat deletion does not conflict with elput shutdown

@fix
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz ea4ae11023 elput: unref devices in post event cb
@fix
2017-07-28 15:40:47 -04:00
Derek Foreman 69c6cbfdf1 elput: Close fds when asked to
Our close callback tells logind we're done with a device, but it should
also actually close the fd it's passed, or we end up leaking piles of
fds on VC switch.

see weston commit 8f5acc2f3a29c3831af4ddd6bed57f703c98dc77
and subsequent regression in commit 72dea06d7952e3ce8dd8057f7106186da4fa2678
and pending fix in https://patchwork.freedesktop.org/patch/168992/
2017-07-25 16:59:11 -05:00
Derek Foreman 27f88b534a elput: Fix multiple open/close of drm devices
When I added the code to probe drm devices to ensure they're
modeset capable (ref 414d406b3b)
I didn't realize elput didn't allow us to open and close more than
one drm device at startup without blowing up libinput.

This is a somewhat dirty hack to rough that in.

The problem is that open/close the device during startup will
result in an async "gone" callback from logind, which then kicks
off an input shutdown.  We need to try harder to only do that
shutdown when it makes sense.
2017-07-24 16:06:52 -05:00
Chris Michael c45da5c138 elput: Fix resource leak
Coverity CID1377539 says that we leak the eldbus reply here when we
error out, so be sure to cleanup 'reply'

Fixes CID1377539

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-12 11:02:16 -04:00
Chris Michael 1b97abae49 elput: Update modifers for caps lock
Small patch to fix issue of not setting caps_lock modifier. As we
lookup this modifier index when creating keyboard info, we should be
testing for it and setting seat->modifiers accordingly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 14:27:27 -04:00
Chris Michael 8fdb4e0d8d elput: Fix support for setting keyboard led(s)
Small patch to update keyboard led(s) when caps, numlock, etc are
pressed. This patch adds some fields to internal (non-API exposed)
structures inside our private header (of a BETA-API library) and thus
should still be ok during freeze.

Fixes T5655

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 14:14:06 -04:00
Chris Michael 4052923ed0 elput: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 13:13:59 -04:00
Mike Blumenkrantz 21276eac5b elput: don't leak event pointers 2017-07-07 15:22:23 -04:00
Mike Blumenkrantz ad0aae8f8d elput: remove keymap mmap+event
this was originally intended to allow some code to be moved out of the
compositor, but the idea turned out to be unfeasible since multiple
display backends need to be supported and not all related components
will provide similar functionality
2017-06-16 12:23:08 -04:00
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