aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_mouse.c
diff options
context:
space:
mode:
authorJengHyun Kang <jhyuni.kang@samsung.com>2016-03-23 17:55:09 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-03-23 17:58:41 -0400
commit3cdc11a107cd62f9de82de4374e789485d4e86c3 (patch)
treeb54690a473da2a577106249526894eb96636fef1 /src/bin/e_mouse.c
parentsend resize edges to wl clients on resize start and end (diff)
downloadenlightenment-3cdc11a107cd62f9de82de4374e789485d4e86c3.tar.gz
Add functionality for setting left handed mode in drm
Summary: - Change mouse button mapping for left handed mode - Change a mouse_hand config and save Currently e_mouse had e_mouse_update() API for support left_handed mode. But that API only for Xorg not support wayland and only for update mapping not change mapping. So I added new support for change mouse mapping for left handed mode and support wayland backend system. Test Plan: After set left handed mode, mouse button mapping is changed for left handed people. Reviewers: raster, devilhorns, zmike Subscribers: ohduna, input.hacker, cedric Differential Revision: https://phab.enlightenment.org/D3433
Diffstat (limited to 'src/bin/e_mouse.c')
-rw-r--r--src/bin/e_mouse.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/bin/e_mouse.c b/src/bin/e_mouse.c
index 5aaa561e5..ac90d7415 100644
--- a/src/bin/e_mouse.c
+++ b/src/bin/e_mouse.c
@@ -1,4 +1,7 @@
#include "e.h"
+#ifdef HAVE_WL_DRM
+#include <Ecore_Drm.h>
+#endif
E_API int
e_mouse_update(void)
@@ -41,7 +44,18 @@ e_mouse_update(void)
if (!ecore_x_pointer_mapping_set(map, n)) return 0;
}
#endif
+#ifdef HAVE_WL_DRM
+ if (strstr(ecore_evas_engine_name_get(e_comp->ee), "drm"))
+ {
+ const Eina_List *list, *l;
+ Ecore_Drm_Device *dev;
+ list = ecore_drm_devices_get();
+ EINA_LIST_FOREACH(list, l, dev)
+ {
+ ecore_drm_device_pointer_left_handed_set(dev, (Eina_Bool)!e_config->mouse_hand);
+ }
+ }
+#endif
return 1;
}
-