diff options
author | JengHyun Kang <jhyuni.kang@samsung.com> | 2015-12-29 09:03:43 -0500 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2015-12-29 09:04:16 -0500 |
commit | eb9b894167ea2bf0628f5b93a47e47e5c6d19cfd (patch) | |
tree | 47a4ecf48bf43f69a5cd635e2e1b196d1e6fbb69 /src/lib/ecore_drm/ecore_drm_evdev.c | |
parent | d05a14671e8d0a0100aa71b853cd36d848c6d05c (diff) |
Add a new Ecore_Drm API for setting left-handed mouse
Summary:
Add a new Ecore_Drm API named ecore_drm_device_left_handed_set().
Libinput support various input options. Left handed mode is one of options.
Right-handed people and left-handed people use a mouse
using different button mapping.
So if a left handed option is enabled, libinput change right mouse button and
left mouse button.
So support this option, I added this api using libinput's left handed option.
@feature
Test Plan:
After set left handed mode, left mouse button generate button numbered 3,
and right mouse button generate button numbered 1.
Reviewers: raster, ManMower, devilhorns
Subscribers: ohduna, cedric, jpeg, input.hacker
Differential Revision: https://phab.enlightenment.org/D3431
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_evdev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index 1052f98f7c..b40aa43962 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c | |||
@@ -651,6 +651,17 @@ _ecore_drm_evdev_device_create(Ecore_Drm_Seat *seat, struct libinput_device *dev | |||
651 | 651 | ||
652 | /* TODO: make this configurable */ | 652 | /* TODO: make this configurable */ |
653 | edev->mouse.threshold = 250; | 653 | edev->mouse.threshold = 250; |
654 | |||
655 | dev = seat->input->dev; | ||
656 | if (dev->left_handed == EINA_TRUE) | ||
657 | { | ||
658 | if (libinput_device_config_left_handed_set(device, 1) != | ||
659 | LIBINPUT_CONFIG_STATUS_SUCCESS) | ||
660 | { | ||
661 | WRN("Failed to set left hand mode about device: %s\n", | ||
662 | libinput_device_get_name(device)); | ||
663 | } | ||
664 | } | ||
654 | } | 665 | } |
655 | 666 | ||
656 | if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH)) | 667 | if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH)) |