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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
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
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>
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>
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>
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>
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>
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>
"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
'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
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
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>
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>
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>
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>
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>
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>
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>
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>
This patch makes elput handle receiving the key combinations for vt
switching and perform the actual switch itself. This is done so that
ecore_drm2, ecore_fb, etc, etc do not each need their own code to
handle vt switching.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds a new API function to Elput that can be used to switch
to a given VT. This allows drm2 or enlightenment to switch to a given
virtual terminal in response to keybindings.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds support for notifying when a session gets activated or
deactivated. This will be used in drm2 to notify compositor when to
pause/restart rendering during a vt switch
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As we do not need minor or fd from the dbus message during input
device resume, we can remove these variables
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Small patch to add an API function that can be used to set the current
pointer position on a given seat name. This function (typically) will
be used inside an Ecore_Evas to "pointer warp".
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Small patch to add an API function that can be used to retrieve
current pointer position on a given seat name.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
NB: Minor cosmetic changes such as removing a commented out line of
code and fixing an error message
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds start of code to create or remove input devices such
as keyboards, pointers, or touch devices.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As this library is just going to deal with libinput, we don't need to
have interface functions to activate or restore a virtual terminal.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This adds new API functions which can be called to open or close an input
device and take control (or release control) of said device
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit adds the start of the Elput Manager & Interface code. This
will be used as an inteface to various backend methods of session &
device control (ie: systemd, direct interface, etc). This will provide
various abstractions for working with libinput when opening/closing
input devices.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
The elput library is an efl abstraction for the libinput library which
can be used by various other subsystems (ecore_fb, ecore_drm, etc) to
handle interfacing with libinput without having to duplicate the code
in each subsystem.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>