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>