discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3cdc11a107cd62f9de82de4374e789485d4e86c3

commit 3cdc11a107cd62f9de82de4374e789485d4e86c3
Author: JengHyun Kang <jhyuni.k...@samsung.com>
Date:   Wed Mar 23 17:55:09 2016 -0400

    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
---
 src/bin/e_mouse.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_mouse.c b/src/bin/e_mouse.c
index 5aaa561..ac90d74 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;
 }
-

-- 


Reply via email to