Page MenuHomePhabricator

Add a new API for set a left handed mode.
ClosedPublic

Authored by JHyun on Dec 10 2015, 10:56 PM.

Details

Summary
  • e_mouse_left_handed_set()
  • 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 API for change mouse mapping for left handed mode and support wayland backend system.
Test Plan

After set left handed mode using e_mouse_left_handed_set(),

mouse button mapping is changed for left handed people.

Diff Detail

Repository
rE core/enlightenment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
JHyun updated this revision to Diff 7795.Dec 10 2015, 10:56 PM
JHyun retitled this revision from to Add a new API for set a left handed mode..
JHyun updated this object.
JHyun edited the test plan for this revision. (Show Details)
JHyun added reviewers: devilhorns, raster.
JHyun added subscribers: input.hacker, duna.oh.
devilhorns edited edge metadata.Dec 11 2015, 5:20 AM

Looks ok to me, but I'll wait for @zmike to review

zmike requested changes to this revision.Dec 11 2015, 5:47 AM
zmike edited edge metadata.

Needs changes for DRM compiling.

Also, unless there's an accompanying patch which adds config values and a UI for setting the option, I'm against merging this at all until such a patch is submitted.

src/bin/e_mouse.c
3

Having Wayland does not in any way indicate DRM presence. Use HAVE_WL_DRM instead.

67

Same as above.

This revision now requires changes to proceed.Dec 11 2015, 5:47 AM
zmike added a comment.Dec 11 2015, 7:12 AM

@zmike Yea, ref https://phab.enlightenment.org/D3431 for the DRM side of it

Unless I'm missing something, adding DRM functions in EFL has nothing to do with adding config values and GUI options in Enlightenment?

my bad. I misread your comment. I thought you were looking for the drm API that's being used here.

JHyun edited edge metadata.Dec 13 2015, 7:18 PM
JHyun edited subscribers, added: ohduna; removed: duna.oh.
JHyun updated this revision to Diff 7813.Dec 13 2015, 10:58 PM
JHyun edited edge metadata.

Change for DRM compiling.

I change codes for DRM compiling.

But I don't understand another that you mentioned about config.
Config value 'mouse_hand ' have been existed. It is not new option.
Currently this option is defined in e.src. (Value 1: Right handed)
So I thought there is nothing to do for config.

But if my opinion is wrong, please tell me more specific for config.

JHyun updated this revision to Diff 7837.Dec 15 2015, 8:24 PM
JHyun edited edge metadata.

Change a API name more readable

zmike added a comment.Dec 16 2015, 1:37 PM

Ahhhh okay, I misunderstood the purpose of this patch.

I think the better way of handling this would be to move the new code into e_mouse_update() and leave the config setting for outside of the e_mouse API. This means e_mouse_update() would look something like

 if (e_comp->comp_type == E_PIXMAP_X)
   {all x11 code here}
#ifdef HAVE_WL_DRM
 else if (strstr(ecore_evas_engine_name_get(e_comp->ee, "drm"))
   {your drm code here}
#endif
zmike added a comment.Dec 16 2015, 1:42 PM

I've broken out the existing X11 code, so now you just need to add yours below it with something like

#ifdef HAVE_WL_DRM
 if (strstr(ecore_evas_engine_name_get(e_comp->ee, "drm"))
   {your code}
#endif
zmike requested changes to this revision.Dec 16 2015, 1:42 PM
zmike edited edge metadata.
This revision now requires changes to proceed.Dec 16 2015, 1:42 PM
JHyun updated this revision to Diff 7858.Dec 16 2015, 6:52 PM
JHyun edited edge metadata.

Remove e_mouse_left_handed_set API and merge that function to e_mouse_update() API

JHyun added a comment.Dec 16 2015, 6:57 PM

I remove new API (e_mouse_left_handed_set) and add it to e_mouse_update() function.

zmike requested changes to this revision.Dec 17 2015, 8:40 AM
zmike edited edge metadata.

This looks pretty good in principle. Going to wait on DRM stuff to land first though.

src/bin/e_mouse.c
56

This conditional seems impossible and is misleading for anyone reading the code; it should be removed.

This revision now requires changes to proceed.Dec 17 2015, 8:40 AM
JHyun updated this revision to Diff 7877.Dec 17 2015, 6:27 PM
JHyun edited edge metadata.

Remove a unnecessary condition

JHyun updated this revision to Diff 7884.Dec 17 2015, 11:05 PM
JHyun edited edge metadata.

Modify a ecore_drm_device_pointer_left_handed_set() function's argument type.

@zmike, you ok with this one ?? The APIs have landed for ecore_drm already

JHyun added a comment.Mar 22 2016, 9:31 PM

Is this need to rebase to accept? or have another reason?

This revision was automatically updated to reflect the committed changes.
zmike added a comment.Mar 23 2016, 2:59 PM

Sorry, I forgot about this one. Pushed with some small changes.