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 769276 - allow setting edge scrolling even when two finger scrolling is supported
allow setting edge scrolling even when two finger scrolling is supported
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: 769543
 
 
Reported: 2016-07-28 15:04 UTC by Frederic Peters
Modified: 2016-08-20 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow setting edge scrolling even if 2-finger scoll is supported (2.25 KB, patch)
2016-07-28 15:05 UTC, Frederic Peters
needs-work Details | Review
backends: Update two-finger scrolling before edge scrolling (1.48 KB, patch)
2016-08-05 10:18 UTC, Bastien Nocera
committed Details | Review

Description Frederic Peters 2016-07-28 15:04:15 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=768245 to re-add support for edge scrolling landed in mutter, and related patches in gsettings-desktop-schemas and gnome-control-center but mutter still won't set edge scrolling if two-finger scrolling is enabled and available.

/* Don't set edge scrolling if two-finger scrolling is enabled and available */
Comment 1 Frederic Peters 2016-07-28 15:05:45 UTC
Created attachment 332282 [details] [review]
allow setting edge scrolling even if 2-finger scoll is supported
Comment 2 Bastien Nocera 2016-07-28 15:09:54 UTC
(In reply to Frederic Peters from comment #0)
> https://bugzilla.gnome.org/show_bug.cgi?id=768245 to re-add support for edge
> scrolling landed in mutter, and related patches in gsettings-desktop-schemas
> and gnome-control-center but mutter still won't set edge scrolling if
> two-finger scrolling is enabled and available.
> 
> /* Don't set edge scrolling if two-finger scrolling is enabled and available
> */

That's on purpose. You can only enable edge scrolling for a device if two-finger scrolling is disabled or unavailable.

The UI enforces this.
Comment 3 Bastien Nocera 2016-07-28 15:14:12 UTC
Review of attachment 332282 [details] [review]:

::: src/backends/x11/meta-input-settings-x11.c
@@ +236,3 @@
   memcpy (values, defaults, SCROLL_METHOD_NUM_FIELDS);
 
+  if (available[SCROLL_METHOD_FIELD_EDGE])

That's incorrect. You need to check whether 2fg is disabled as well. We can't turn both on when using libinput directly, and we don't want that either in X11.
Comment 4 Florian Müllner 2016-07-28 15:24:33 UTC
Review of attachment 332282 [details] [review]:

::: src/backends/x11/meta-input-settings-x11.c
@@ +251,3 @@
+
+  /* Disable two-finger scrolling when edge scrolling is enabled */
+  if (values[SCROLL_METHOD_FIELD_EDGE] && values[SCROLL_METHOD_FIELD_2FG])

So you allow setting edge-scrolling despite two-finger scrolling also being enabled, which works when you change the setting. But on restart you'll end up with two-finger scrolling again, because apply_device_settings() calls update_touchpad_edge_scroll() before update_touchpad_two_finger_scroll() (so the latter overwrites the former again).

This looks utterly confusing, and I don't see how there's a better option to handle two conflicting options that are both enabled than picking one of the options to "win" in that case.

What is your use case for enabling edge-scrolling but not disabling two-finger scrolling?
Comment 5 Bastien Nocera 2016-07-28 16:16:07 UTC
(In reply to Florian Müllner from comment #4)
> Review of attachment 332282 [details] [review] [review]:
> 
> ::: src/backends/x11/meta-input-settings-x11.c
> @@ +251,3 @@
> +
> +  /* Disable two-finger scrolling when edge scrolling is enabled */
> +  if (values[SCROLL_METHOD_FIELD_EDGE] && values[SCROLL_METHOD_FIELD_2FG])
> 
> So you allow setting edge-scrolling despite two-finger scrolling also being
> enabled, which works when you change the setting. But on restart you'll end
> up with two-finger scrolling again, because apply_device_settings() calls
> update_touchpad_edge_scroll() before update_touchpad_two_finger_scroll() (so
> the latter overwrites the former again).
> 
> This looks utterly confusing, and I don't see how there's a better option to
> handle two conflicting options that are both enabled than picking one of the
> options to "win" in that case.
> 
> What is your use case for enabling edge-scrolling but not disabling
> two-finger scrolling?

The original patch, and the UI enforces this, you can only have one enabled at a time. If both are enabled in GSettings, 2fg wins if it is available.

That allows people with edge cases (edge scrolling only available on one of 2 touchpads) to have edge scrolling enabled on one and 2fg on the other.

I'll look at this on another machine when I'm done working out some other stuff.
Comment 6 Bastien Nocera 2016-07-29 14:51:20 UTC
This is a problem with ordering, in which we'd end up with both edge scrolling and 2fg enabled at some point in the process.

We need the meta-input-settings to always call both function, in the right order, when one changes as the backends don't have access to GSettings.
Comment 7 jeremy9856 2016-08-02 08:56:13 UTC
Hello,

Edge scroll doesn't work anymore and two finger scroll stay enabled. I'm on Fedora 24 and I first thought that it was a libinput bug but Peter Hutterer showed me that my problem is due to this bug. 

https://bugs.freedesktop.org/show_bug.cgi?id=97090

It seem that the new settings added in bug 768245 are still not implemented in Mutter 3.20. Maybe it's just that that I miss because I simply want to disable two-finger scrolling and enable edge scrolling.

Thanks !
Comment 8 Bastien Nocera 2016-08-02 09:01:26 UTC
(In reply to jeremy9856 from comment #7)
<snip>
> It seem that the new settings added in bug 768245 are still not implemented
> in Mutter 3.20.

There won't be any changes in GNOME 3.20, the feature requires UI changes, which we cannot make in stable releases.
Comment 9 jeremy9856 2016-08-02 09:05:09 UTC
Is it possible to at least add a gsetting entry please ?
Comment 10 jeremy9856 2016-08-03 09:51:46 UTC
A gsetting or as the bug report says allow setting edge scrolling even when two finger scrolling is supported for 3.20 and up. I really miss this feature as the 2 fingers scroll is really not precise / reliable with my touchpad.

Thanks !
Comment 11 Bastien Nocera 2016-08-05 10:18:30 UTC
Created attachment 332790 [details] [review]
backends: Update two-finger scrolling before edge scrolling

As whether edge scrolling is enabled depends on whether two-finger
scrolling is disabled, make sure to update two-finger scrolling first.

Note that this only fixes the problem on startup. Changing the
settings in GSettings directly might cause an inconsistent state, but
the main UI for this setting, gnome-control-center, makes sure to
update two-finger scrolling before edge scrolling.
Comment 12 Bastien Nocera 2016-08-05 10:20:24 UTC
(In reply to jeremy9856 from comment #10)
> A gsetting or as the bug report says allow setting edge scrolling even when
> two finger scrolling is supported for 3.20 and up. I really miss this
> feature as the 2 fingers scroll is really not precise / reliable with my
> touchpad.

Seriously, just stop spamming this bug with unrelated requests.
Comment 13 jeremy9856 2016-08-05 10:26:49 UTC
(In reply to Bastien Nocera from comment #12)
> Seriously, just stop spamming this bug with unrelated requests.

Ok but tell me what I'm supposed to do to get back edge scrolling in Fedora 24 please ? And please don't tell me, go code it yourself, because if I knew how to do it we won't be in this situation.

As a side note, please, could you be more polite with people, Bastien. Thanks.
Comment 14 Bastien Nocera 2016-08-05 10:31:29 UTC
(In reply to jeremy9856 from comment #13)
> (In reply to Bastien Nocera from comment #12)
> > Seriously, just stop spamming this bug with unrelated requests.
> 
> Ok but tell me what I'm supposed to do to get back edge scrolling in Fedora
> 24 please ? And please don't tell me, go code it yourself, because if I knew
> how to do it we won't be in this situation.

You don't. Or you file a new bug requesting that.

> As a side note, please, could you be more polite with people, Bastien.
> Thanks.

This isn't a forum, and you keep asking questions about re-adding edge scrolling in a distribution (this isn't the distribution's forum), in a bug that's about extra fixes on top of the already merged functionality.

If you want tech support, there's a number of companies that will provide that, and I'm sure the people you'll talk to will be plenty polite. In the meanwhile, you're wasting my time.
Comment 15 Inactive account 2016-08-05 10:38:04 UTC
Just to interject so that he knows, you can get Fedora support here: https://ask.fedoraproject.org/en/questions/

As well as here: https://unix.stackexchange.com/

There will be other places but these are the most common I know of.
Comment 16 jeremy9856 2016-08-05 11:33:22 UTC
I didn't know that was not the relevant bug report. As I said, Peter Hutterer, the libinput dev and a really nice and competent guy, showed me that my problem is due to this bug.

https://bugs.freedesktop.org/show_bug.cgi?id=97090

Maybe I should remember you guys that Fedora 24, like a lot of other distro use Gnome... if there is something broken in Gnome it's in Gnome that should be fixed obviously. Anyway I will open a new bug report to get back edge scrolling in Gnome 3.20 that Fedora 24 simply use. Can you at least show me where I should open the bug report (Mutter ?).

Thanks I guess...
Comment 17 jeremy9856 2016-08-05 11:33:59 UTC
(In reply to cooks.go.hungry from comment #15)
> Just to interject so that he knows, you can get Fedora support here:
> https://ask.fedoraproject.org/en/questions/
> 
> As well as here: https://unix.stackexchange.com/
> 
> There will be other places but these are the most common I know of.

Thanks but it's a regression in Gnome so these like are not useful at all in this case.
Comment 18 Bastien Nocera 2016-08-05 11:46:27 UTC
(In reply to jeremy9856 from comment #17)
> (In reply to cooks.go.hungry from comment #15)
> > Just to interject so that he knows, you can get Fedora support here:
> > https://ask.fedoraproject.org/en/questions/
> > 
> > As well as here: https://unix.stackexchange.com/
> > 
> > There will be other places but these are the most common I know of.
> 
> Thanks but it's a regression in Gnome so these like are not useful at all in
> this case.

The regression is already fixed in GNOME. This bug was opened to track a very specific problem with the newly re-added edge scrolling support.

(In reply to jeremy9856 from comment #16)
> I didn't know that was not the relevant bug report. As I said, Peter
> Hutterer, the libinput dev and a really nice and competent guy, showed me
> that my problem is due to this bug.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=97090
> 
> Maybe I should remember you guys that Fedora 24, like a lot of other distro
> use Gnome... if there is something broken in Gnome it's in Gnome that should
> be fixed obviously.

Already fixed in the GNOME planned for Fedora 25. And Fedora 23 is still supported.

> Anyway I will open a new bug report to get back edge
> scrolling in Gnome 3.20 that Fedora 24 simply use. Can you at least show me
> where I should open the bug report (Mutter ?).

Against mutter. The mutter developers will then choose whether backporting is worth the trouble.
Comment 19 jeremy9856 2016-08-05 12:02:45 UTC
Ok thank you very much Bastien, and cooks.go.hungry@gmail.com too !
Comment 20 Frederic Peters 2016-08-10 13:27:05 UTC
Bastien, I've now been able to test your patches (here and in gnome-control-center) and they work fine as far as I'm concerned; thanks.
Comment 21 Bastien Nocera 2016-08-12 09:06:41 UTC
(In reply to Frederic Peters from comment #20)
> Bastien, I've now been able to test your patches (here and in
> gnome-control-center) and they work fine as far as I'm concerned; thanks.

Yay! :)
Comment 22 Florian Müllner 2016-08-19 09:18:36 UTC
Review of attachment 332790 [details] [review]:

Looks good
Comment 23 Bastien Nocera 2016-08-20 14:06:51 UTC
Attachment 332790 [details] pushed as c977ba1 - backends: Update two-finger scrolling before edge scrolling