path: root/src/lib/elput/elput_logind.c (follow)
AgeCommit message (Collapse)Author
2017-07-25elput: Close fds when asked toDerek Foreman
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
2017-07-24elput: Fix multiple open/close of drm devicesDerek Foreman
When I added the code to probe drm devices to ensure they're modeset capable (ref 414d406b3b442216543cdaef112787696ae09898) 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-12elput: Fix resource leakChris Michael
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 <>
2017-05-31elput: Fix logind session object pathDerek Foreman
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-26elput/drm: redo xkb context/keymap settingMike Blumenkrantz
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-01-25elput: Fix resource leakChris Michael
Coverity reports that we leak 'msg' here if we fail to append arguments to the message. Fixes CID1367499 @fix Signed-off-by: Chris Michael <>
2016-12-19elput: Fix resource leakChris Michael
Coverty reports that we leak 'reply' here if we fall into the error condition. CID1367506 @fix Signed-off-by: Chris Michael <>
2016-12-19elput: Fix resource leakChris Michael
Coverity reports that 'reply' is leaked here if we fall into the error condition. CID1367507 @fix Signed-off-by: Chris Michael <>
2016-09-20ecore_con,elput: fix warningsBruno Dilly
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: Signed-off-by: Cedric BAIL <>
2016-07-11elput: check for a special return valueMarcel Hollerbach
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-06-21elput: Support suspending and resuming inputs on vt switchChris Michael
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 <>
2016-06-13elput: Fix issue of VT-Switching not workingChris Michael
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 <>
2016-06-07Revert "elput: Missing pointer initialization."Chris Michael
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 ad2e21b02399c02a748bb8b8ab0dc10f85e6662d.
2016-06-07elput: Missing pointer initialization.Benjamin Jacobs
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: @fix
2016-06-06elput: Fix crash whem sd_session_get_seat failsChris Michael
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 <>
2016-05-26elput: Minor formatting fixesChris Michael
NB: No functional changes, just cleanup of formatting Signed-off-by: Chris Michael <>
2016-05-25elput: Fix formattingChris Michael
NB: No functional changes, just making this readable Signed-off-by: Chris Michael <>
2016-05-25elput: change some functions and internal flags to enable async input setupMike Blumenkrantz
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-25elput: define and implement an async device opening interface for libinputMike Blumenkrantz
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-25elput: remove 'sync' param from device managementMike Blumenkrantz
unnecessarily complicates code
2016-05-09elput: Add API function to switch to a given vtChris Michael
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 <>
2016-05-09elput: Remove erroneous debug print outChris Michael
NB: No functional changes, just cleanup of extra debug message and commented out codeblock Signed-off-by: Chris Michael <>
2016-05-09elput: Support sending of session activate/deactivate eventChris Michael
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 <>
2016-05-09elput: Remove useless dbus argument fetchingChris Michael
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 <>
2016-04-13elput: Create and raise event when seat capabilities changeChris Michael
Signed-off-by: Chris Michael <>
2016-04-13elput: Remove vt activate/restore from input manager interfaceChris Michael
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 <>
2016-04-13elput: Add API functions to open and close an input deviceChris Michael
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 <>
2016-04-13elput: Add input manager interface and APIs to connect & disconnectChris Michael
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 <>