Commit Graph

173 Commits

Author SHA1 Message Date
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
Chris Michael df1a1e05a9 elput: Don't add devices which we are not going to use
If an input device is not a pointer, keyboard, or touch device then we
are not going to be handling events for it, so do not create a new
Elput device for it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-31 10:54:09 -05:00
Chris Michael d90be60e47 Revert "elput: Change return of device_add/remove functions"
Reverting this in favor of a better way to improve debug output

This reverts commit cee7ee3993.
2017-01-31 10:53:30 -05:00
Chris Michael cee7ee3993 elput: Change return of device_add/remove functions
Minor change on the return value of the device_add and device_remove
functions so that we can avoid debug output for devices which we do
not deal with.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-31 10:34:22 -05:00
Chris Michael ea3c1d17da elput: Add more robust debugging output for input devices
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-31 10:29:25 -05:00
Chris Michael 358b4b9a9a elput: Fix resource leak
Coverity reports that we leak 'msg' here if we fail to append
arguments to the message.

Fixes CID1367499

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-25 09:09:38 -05:00
Chris Michael 2af4858e2a elput: Return touch coordinates when we have no pointer
If a user calls elput_input_pointer_xy_get (as is done via
ecore_evas_drm) and a pointer does not exist, we never return any
coordinates for this function.

Enlightenment is using ecore_evas_pointer_xy_get (which when using the
drm ee, ends up calling elput_input_pointer_xy_get). If we have no
pointer device, then no coordinates are ever returned and touch
clicking does not function properly.

To fix that we will check if a touch device exists and supply the
coordinates from that (in the case where there is no pointer device).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 11:36:50 -05:00
Chris Michael 251f52006f elput: Send touch motion before sending touch button events
This patch sends a touch motion event before sending of touch up/down
events. This allows some compositors (enlightenment) to update their
internal representation of where the mouse pointer is before handling
button events (as touch down/up is treated as a mouse button down/up).

Fixes T5094 for the old man ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 11:11:50 -05:00
Chris Michael 343a272328 elput: Store touch timestamp and slot
This patch adds a timestamp field to the touch structure so that we
can store it and do not have to refetch the timestamp when sending
touch events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 11:11:50 -05:00
Chris Michael d0a6263519 elput: Fix resource leak
Coverty reports that we leak 'reply' here if we fall into the error
condition.

CID1367506

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-19 09:49:36 -05:00
Chris Michael fe27a8d440 elput: Fix resource leak
Coverity reports that 'reply' is leaked here if we fall into the error
condition.

CID1367507

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-19 09:48:30 -05:00
Chris Michael 6ff374256c elput: Properly check return values from libinput config functions
As libinput_config_status may contain 3 possible return values, we
need to santize the return values there into Eina_Bool for use in our
own functions.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael b27ebc6294 elput: Add API functions to get/set if tap-to-click is enabled
This patch adds API functions to get or set if tap-to-click is enabled
on a touchpad device

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 73a074498a elput: Add API functions to get/set touchpad click method
This patch adds API functions to get or set the click method used on
touch devices. The click method defines when to generate software
emulated buttons

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 0f81e32433 elput: Add API functions to get/set the scroll method for a touchpad
device

This patch adds API functions which can be used to get or set the
scroll method used for a given device. Scroll method defines when to
generate scroll axis events

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 68e1c9e0a0 elput: Add API functions to enable/disable dwt support on touchpads
This patch adds API functions to get/set if dwt (disable-while-typing) is
enabled on a touchpad.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 6eb34e2199 elput: Add API functions to enable/disable drag-lock on touch devices
This patch adds API functions to get or set if drag-lock is enabled on
touch devices.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 0b2a32212a elput: Add API functions to enable/disable tap-and-drag
This patch adds new API functions for Elput touch devices to get or set if
tap-and-drag is enabled on a touchpad device

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-14 09:18:14 -05:00
Chris Michael 8ebf4cd972 elput: Improve checks for keyboard & pointer devices
Some devices reported by libinput show up as both keyboard and mouse,
even tho they are physically only just a keyboard or just a mouse.
When a device gets added, we can verify if it is actually a mouse by
checking if the device has BTN_LEFT (and for keyboards, check
KEY_ENTER). This stops us from getting multiple mouse pointers
reported when we really only have one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 14:32:22 -05:00
Chris Michael 93f7639c0d elput: Add API to allow setting pointer acceleration profile
This patch adds an API that can be used to set a pointer acceleration
profile. This API should be used when addressing T4736

ref T4736

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-02 09:58:43 -04:00
Bruno Dilly a3fba57b26 ecore_con,elput: fix warnings
Summary:
elput: fix warning for unused write result
         ecore_con: fix warning for unused asprintf result

Reviewers: iscaro, devilhorns, cedric

Reviewed By: cedric

Subscribers: cedric, seoz, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-20 16:13:28 -07:00
Jihoon Kim 4675edfcf9 elput: Fix typo in doxygen
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 14:55:50 +09:00
Derek Foreman 3d5dbbfcd0 elput: Use correct filename in unlink
We switched from mkstemp to eina_file_mkstemp() but ended up unlinking
the template filename, which didn't exist on the filesystem.
2016-07-26 12:38:24 -05:00
Chris Michael 32af25ebb9 elput: Fix issue of losing mouse input when removing a device
When we are adding new input devices, if we already have an existing
one (keyboard, pointer, touch, etc) then we should just be
incrementing the device count and returning from the init function.
Previous code here would increment the device count, then continue on
and create a new internal representation of the device. This was
causing issues when a device gets removed.

Fixes T4192

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-25 10:55:57 -04:00
Chris Michael 4309050fec elput: Use proper variable type
The 'getenv' function returns char * ... not a const char *, so adjust
variable type to match

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-21 13:18:57 -04:00
Chris Michael 2437d53278 elput: Cleanup erroneous errors when trying to get output name
When we make calls to get an Input device's output name, if the device
does not have an output name it's not actually an error so just return
NULL with less noise

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-13 11:41:09 -04:00
Marcel Hollerbach 38554b652a elput: check for a special return value
sd_pid_get_session returns ENODATA or ENXIO if it was unable to fetch
the session data for the given pid, reason for that is mostly that the
pid is not running is a session. Adding this as the error value can help
the user debugging the problem without the need of gdb´ing into the
function and checking the return value.
2016-07-11 11:02:52 +02:00
Carsten Haitzler 9c80c2b070 elput - simplify and fix handling of string overflow with xdg runtimedir
this addresses an issue pointed to by CID 1357168
2016-07-09 12:01:51 +09:00
Carsten Haitzler 870c81fd72 elput - remove pointless code in handling touch event
i commented the pointless code out. this fixes CID 1357145
2016-07-09 11:57:30 +09:00
Chris Michael cb2ab38421 elput: Fix horrid typo
Not sure how this happened, but use a ; not a : ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-08 08:54:45 -04:00
Chris Michael ee72059219 elput: Fix insecure temporary file
Fix using mkstemp directly without securely setting umask first by
making use of eina_file_mkstemp which does set unmask.

Fixes Coverity CID1357165

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-08 08:51:54 -04:00
Chris Michael e0cde40475 elput: Add API function to return output name associated with input
device

This patch adds a new API function which we can call from Ecore_Drm2
which will return the name of an output which is associated with a
given input device. This output name can then be used to find a
matching output, and perform any device calibration that is needed.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-08 08:05:14 -04:00
Chris Michael 0f965446a8 elput: Check return of read function call
If we fail to read any bytes from the fd, then we should be returning
a failure here.

Fixes Coverity CID1357143

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 10:54:22 -04:00
Chris Michael b2a4f45790 elput: Support suspending and resuming inputs on vt switch
This patch fixes an issue where input would stop working when you
vt-switch away and back again in a running Enlightenment Wayland
session. Basically, when we vt-switch away, we need to tell libinput
to suspend input event processing, and when we return to re-enable it.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-21 12:46:29 -04:00
Chris Michael 3adf6fdbae elput: Trap for null physical seat name
It could be possible that libinput_seat_get_physical_name does not
return a valid name, in which case searching for seats will fail. This
small patch just checks for a valid name being passed in and if not,
searches for a default seat name

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-16 13:01:33 -04:00
Chris Michael 28f79d4585 elput: Fix issue of VT-Switching not working
This patch fixes an issue where you could not VT-switch away from a
running Enlightenment session by simplifying the vt switch code and
passing the proper arguments to the dbus message.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04:00
Chris Michael 09fc4e7b68 Revert "elput: Missing pointer initialization."
Reverting this as the initialization of char *s was already set to
NULL in a previous patch, so the 'if (s)' check here is pointless
really as 'man 3 free' says passing NULL to free() is ok.

This reverts commit ad2e21b023.
2016-06-07 12:09:20 -04:00
Benjamin Jacobs ad2e21b023 elput: Missing pointer initialization.
Summary:
Calling free() on an uninitialized pointer leads to crash, that can occurs
when sd_session_get_seat fails.
Fixes T3785.

Reviewers: devilhorns

Subscribers: cedric, jpeg

Maniphest Tasks: T3785

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

@fix
2016-06-07 09:43:01 -04:00
Chris Michael 180e64653d elput: Fix crash whem sd_session_get_seat fails
If systemd fails to give us a valid session id, then any further calls
to get a seat from that session are going to fail. As such, check for
a valid seat return from systemd before calling any systemd functions
which require session id.

Fixes T3785

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-06 14:53:35 -04:00
Mike Blumenkrantz 596b132226 Revert "elput: Use Eeze function to get the udev to create context with"
This reverts commit 7b3d20371e.

using a separate context was intentional here since libudev is not threadsafe
and this will crash
2016-06-02 11:12:06 -04:00
Chris Michael 7b3d20371e elput: Use Eeze function to get the udev to create context with
As we already link to Eeze and use it throughout this code, there is
no point in adding an extra dependency on libudev itself when we can
just use Eeze functions to get what we need. This is a better fix for
T3712

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-02 10:24:42 -04:00
Chris Michael 20f418b8d7 elput: Add API function to support caching of existing keymap
@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 09:17:46 -04:00
Chris Michael 65cfdaa3dd elput: Add API function to support caching of an xkb_context
@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 09:12:53 -04:00
Chris Michael 2c043ca205 elput: Add APIs to support keyboard key remapping
This patch adds 2 new API functions which can enable keyboard key
remapping, and set which keys are to be remapped.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-26 12:49:24 -04:00
Chris Michael 054a9c8182 elput: Add API function to calibrate input devices
This adds an API function that can be called to calibrate input
devices based on a given output size

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-26 11:43:22 -04:00
Chris Michael ad58478b76 elput: Remove badly named API
This patch removes an API function that basically "tried to do too
much". This was supposed to be used for centering mouse pointer and
calibrating an input device based on output size. Remove this
silliness. It would be better to have one API for calibrating, and a
separate API for pointer centering. These new APIs will come shortly
in pending patches.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-26 11:37:18 -04:00
Chris Michael bf7978d9e3 elput: Fix issue where double/triple click was not working
As we use the mouse threshold for determining double/triple clicking,
it would probably be a good idea if that threshold had a value

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-26 11:35:42 -04:00
Chris Michael 3c6cb6a02b elput: Minor formatting fixes
NB: No functional changes, just cleanup of formatting

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-26 08:42:38 -04:00
Chris Michael 03c42fd2cb elput: Fix formatting
NB: No functional changes, just making this readable

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-25 15:03:15 -04:00
Mike Blumenkrantz b9ecdcef6a elput: use physical name of seat when finding existing seats
"seat0" is used as the default internal name, and this is a physical name.
using the logical name causes mismatches and allows devices to function
in unintended ways
2016-05-25 12:57:27 -04:00
Mike Blumenkrantz 8c3f0ff640 elput: further simplify device internals
'window' and pointer max w/h attributes are set for a manager object,
so let the attributes stay there. this also resolves issues where devices
created at a later point would fail to be initialized with these attributes
2016-05-25 12:57:27 -04:00
Mike Blumenkrantz 7fdcf841f5 elput: change some functions and internal flags to enable async input setup
this sets attributes on the Elput_Manager struct so that devices created at
a later point can then have relevant attributes applied to them
2016-05-25 12:57:27 -04:00
Mike Blumenkrantz 5f088b026d elput: define and implement an async device opening interface for libinput
this adds an overly-complex method of removing blocking dbus calls from libinput's
synchronous device initialization architecture. libinput was clearly never meant
to be used in this way, but we're doing it anyway because we're efl.

 #SamsungFeatures
2016-05-25 12:57:27 -04:00
Mike Blumenkrantz 33a5d44dcf elput: remove 'sync' param from device management
unnecessarily complicates code
2016-05-25 12:57:26 -04:00
Chris Michael eec50ed7bd elput: Add API function to set left-handed device
This commit adds an API function which Enlightenment can call in order
to set an input device to be "left-handed". Mainly used for a mouse
pointer, but not specific to pointers.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-24 09:19:04 -04:00
Chris Michael 9ecc3ba38d elput: Check return of calibration_get_default_matrix function
We should be checking the return value when we try to get the default
matrix calibration for an input device so we can fail properly

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-20 11:30:33 -04:00
Chris Michael 6cd9605029 elput: Don't calculate pointer constraints twice
As constraints for pointer movement are already handled in the
function which sends the pointer motion event, there is no need to
handle them inside the function which gets pointer position.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-20 11:18:21 -04:00
Chris Michael 63787ee459 elput: Don't multiply pointer axis value
Reporting of mouse axis values should not be multiplied by 10. This
will cause serious jumps in wheel events. Loosely based on
1a339c9e59

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-14 03:35:09 -04:00
Chris Michael fa5abb2967 elput: Add API function to set max allowed pointer position
This patch adds an API function that can be used to restrict mouse
movement from going outside a screen

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-10 15:12:53 -04:00
Chris Michael 3954aa5518 elput: Fix issue of NULL seat named being passed during input init
When calling elput_input_init we need to check for a valid seat name
being passed in. If no seat name is provided, we will use the default
seat name.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-10 14:36:35 -04:00
Chris Michael be763a011c elput: Add API function to return a list of Elput_Devices on a given
seat

This patch adds a new API function which can be called to retrieve a
list of existing Elput_Devices on a given Elput_Seat.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-10 13:49:38 -04:00
Chris Michael ba3a91a8b5 elput: Add API function to return a list of seats
This patch adds a new API function which can be used to return a list
of existing Elput_Seat objects from a given manager.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-10 13:46:31 -04:00