After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746290 - Add configuration options for libinput_config_click_method
Add configuration options for libinput_config_click_method
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on: 746181
Blocks:
 
 
Reported: 2015-03-16 14:30 UTC by Carlos Garnacho
Modified: 2015-05-08 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backend: Add set_click_method MetaInputSettings vfunc (3.51 KB, patch)
2015-03-16 14:31 UTC, Carlos Garnacho
accepted-commit_now Details | Review
backends/native: Implement set_click_method configuration option (3.38 KB, patch)
2015-03-16 14:31 UTC, Carlos Garnacho
accepted-commit_now Details | Review
backends/x11: Implement set_click_method configuration option (2.34 KB, patch)
2015-03-16 14:31 UTC, Carlos Garnacho
accepted-commit_now Details | Review
input-settings-x11: Honor default value for click method setting (4.03 KB, patch)
2015-05-05 18:49 UTC, Rui Matos
none Details | Review
input-settings-x11: Honor default value for click method setting (4.14 KB, patch)
2015-05-06 14:12 UTC, Rui Matos
committed Details | Review

Description Carlos Garnacho 2015-03-16 14:30:57 UTC
Bug #746181 adds the schema changes, I'm attaching some patches implementing support for this on native/x11 backends
Comment 1 Carlos Garnacho 2015-03-16 14:31:33 UTC
Created attachment 299513 [details] [review]
backend: Add set_click_method MetaInputSettings vfunc

This will configure the libinput_config_click_method for touchpads.
Comment 2 Carlos Garnacho 2015-03-16 14:31:37 UTC
Created attachment 299514 [details] [review]
backends/native: Implement set_click_method configuration option
Comment 3 Carlos Garnacho 2015-03-16 14:31:42 UTC
Created attachment 299515 [details] [review]
backends/x11: Implement set_click_method configuration option
Comment 4 Rui Matos 2015-03-16 16:30:07 UTC
Review of attachment 299515 [details] [review]:

fine
Comment 5 Rui Matos 2015-03-16 16:30:39 UTC
Review of attachment 299514 [details] [review]:

ok
Comment 6 Rui Matos 2015-03-16 16:30:48 UTC
Review of attachment 299513 [details] [review]:

sure
Comment 7 Rui Matos 2015-03-16 16:31:17 UTC
We're not adding UI in g-c-c for this?
Comment 8 Bastien Nocera 2015-03-17 10:29:14 UTC
(In reply to Rui Matos from comment #7)
> We're not adding UI in g-c-c for this?

No, we default to the hardware-dependent configuration in Xorg/libinput.
We should add it to gnome-tweak-tool though.
Comment 9 Carlos Garnacho 2015-03-17 15:32:18 UTC
Attachment 299513 [details] pushed as 9b50119 - backend: Add set_click_method MetaInputSettings vfunc
Attachment 299514 [details] pushed as ad13fa3 - backends/native: Implement set_click_method configuration option
Attachment 299515 [details] pushed as 3a2920d - backends/x11: Implement set_click_method configuration option
Comment 10 Peter Hutterer 2015-04-23 02:30:01 UTC
Follow up here, xf86-input-libinput 0.9.0 has a bunch of "libinput ... Default" properties that can be used to query the libinput default for each property on each device. This should remove the fixme in the code here.
Comment 11 Rui Matos 2015-05-05 18:49:35 UTC
Created attachment 302940 [details] [review]
input-settings-x11: Honor default value for click method setting

--

This gets rid of the fixme
Comment 12 Peter Hutterer 2015-05-05 21:32:51 UTC
Review of attachment 302940 [details] [review]:

minus the nitpick pointed out, this looks good to me

::: src/backends/x11/meta-input-settings-x11.c
@@ +63,3 @@
+  return NULL;
+}
+

You're dropping nitems_ret so the caller doesn't know how many items are really in data_ret. It may be less than the nitems passed in. Maybe change that parameter to a gulong *nitems so you can return the actual number.
Comment 13 Rui Matos 2015-05-06 14:12:45 UTC
Created attachment 302982 [details] [review]
input-settings-x11: Honor default value for click method setting

--

(In reply to Peter Hutterer from comment #12)
> You're dropping nitems_ret so the caller doesn't know how many items
> are really in data_ret. It may be less than the nitems passed
> in. Maybe change that parameter to a gulong *nitems so you can
> return the actual number.

That was an oversight, but in fact what I intended (and fixed now) was
to check that the nitems passed in is in fact what's returned and fail
otherwise. I think that's the safer option because otherwise calling
code won't know what to do with it anyway since it already needs to
know what each item is and thus how many there are.
Comment 14 Peter Hutterer 2015-05-06 21:46:54 UTC
hmm, I'm not sure that's a good idea, especially for a semi-generic handler. In the past we've appended to properties, so a property with 2 values may end up having 3 in the future, etc. The first two are guaranteed to not change, you should simply ignore the ones you don't know about.

I think the safest way would be to do fail if nitems_ret < nitems and return nitems_ret otherwise. That aside, rev-by: me.
Comment 15 Rui Matos 2015-05-08 15:54:00 UTC
(In reply to Peter Hutterer from comment #14)

> hmm, I'm not sure that's a good idea, especially for a semi-generic
> handler.  In the past we've appended to properties, so a property
> with 2 values may end up having 3 in the future, etc. The first two
> are guaranteed to not change, you should simply ignore the ones you
> don't know about.
>
> I think the safest way would be to do fail if nitems_ret < nitems
> and return nitems_ret otherwise. That aside, rev-by: me.

Fair enough, changed to fail if ret < nitems and warn if ret > nitems
so that we can quickly spot it when/if properties get more items.


Attachment 302982 [details] pushed as dac30a2 - input-settings-x11: Honor default value for click method setting