GNOME Bugzilla – Bug 746290
Add configuration options for libinput_config_click_method
Last modified: 2015-05-08 15:54:05 UTC
Bug #746181 adds the schema changes, I'm attaching some patches implementing support for this on native/x11 backends
Created attachment 299513 [details] [review] backend: Add set_click_method MetaInputSettings vfunc This will configure the libinput_config_click_method for touchpads.
Created attachment 299514 [details] [review] backends/native: Implement set_click_method configuration option
Created attachment 299515 [details] [review] backends/x11: Implement set_click_method configuration option
Review of attachment 299515 [details] [review]: fine
Review of attachment 299514 [details] [review]: ok
Review of attachment 299513 [details] [review]: sure
We're not adding UI in g-c-c for this?
(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.
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
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.
Created attachment 302940 [details] [review] input-settings-x11: Honor default value for click method setting -- This gets rid of the fixme
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.
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.
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.
(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