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 705203 - Natural scroll doesn't work immediately
Natural scroll doesn't work immediately
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
: 712560 715133 721847 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-31 11:37 UTC by Ondrej Holy
Modified: 2014-01-09 15:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
notification screenshot (34.66 KB, image/png)
2013-07-31 11:37 UTC, Ondrej Holy
  Details
add restart notification (6.23 KB, patch)
2013-07-31 11:38 UTC, Ondrej Holy
rejected Details | Review
Patch to fix the issue (2.46 KB, patch)
2013-09-27 17:47 UTC, Carlos Garnacho
committed Details | Review

Description Ondrej Holy 2013-07-31 11:37:23 UTC
Created attachment 250535 [details]
notification screenshot

Natural scroll doesn't work immediately after set up. Show restart notification when natural scroll is changed.

Corresponding bug: 

https://bugzilla.redhat.com/show_bug.cgi?id=874591
Comment 1 Ondrej Holy 2013-07-31 11:38:22 UTC
Created attachment 250536 [details] [review]
add restart notification
Comment 2 Bastien Nocera 2013-07-31 13:06:37 UTC
Review of attachment 250536 [details] [review]:

Why does it need a restart? I'm pretty certain that it shouldn't...
Comment 3 Ondrej Holy 2013-07-31 13:55:17 UTC
(In reply to comment #2)
> Review of attachment 250536 [details] [review]:
> 
> Why does it need a restart? I'm pretty certain that it shouldn't...

At least some opened gnome applications (e.g. gedit) needs to be restarted. Also testing area doesn't work correct when you enable/disable natural scrolling.
Comment 4 Bastien Nocera 2013-07-31 14:32:41 UTC
We need to fix this, not work around it.
Comment 5 Bastien Nocera 2013-07-31 14:34:13 UTC
Comment on attachment 250536 [details] [review]
add restart notification

As per previous comment.
Comment 6 Ondrej Holy 2013-09-27 13:39:41 UTC
(In reply to comment #4)
> We need to fix this, not work around it.

Synaptics Scrolling Distance is set immediately, so g-s-d part is correct. Problem is with gnome applications (nautilus, g-c-c, gedit, devhelp...), which needs to be restarted before. So it's probably connected with smooth scrolling introduced in gtk3, because it looks gtk2 based application change scrolling behavioral immediately. So gdk_event_get_scroll_deltas return wrong deltas probably.

Carlos, could you look at please?
Comment 7 Carlos Garnacho 2013-09-27 17:41:40 UTC
Moving to GTK+, as it's a bug there.
Comment 8 Carlos Garnacho 2013-09-27 17:47:26 UTC
Created attachment 255951 [details] [review]
Patch to fix the issue

GdkDevice::changed is handled on XI2, although there was a bug in scroll valuators, the information stored about those axes in GdkX11DeviceXI2 wasn't being reset prior to the update from the device valuators, so the first value would stay persistently and new values were just appended.

Besides the mild memory issue (device changes are semi-frequent), this also resulted in the first axes being always the effective matches for scroll axes, so the initial value was made persistent throughout the app lifetime.
Comment 9 Ondrej Holy 2013-10-03 10:15:10 UTC
Thanks, it works like charm with attached patch.
Comment 10 Ondrej Holy 2013-11-22 10:28:52 UTC
The patch looks good for me, however I'm not really experienced in gdk stuff. Could somebody look at please to fix this bug finally?
Comment 11 Carlos Garnacho 2013-11-22 11:51:53 UTC
The patch is now on master, I'll look into backporting it to the stable branches
Comment 12 Ondrej Holy 2013-11-22 14:43:49 UTC
*** Bug 712560 has been marked as a duplicate of this bug. ***
Comment 13 Ondrej Holy 2013-11-28 13:35:15 UTC
*** Bug 715133 has been marked as a duplicate of this bug. ***
Comment 14 Ondrej Holy 2014-01-09 15:44:49 UTC
*** Bug 721847 has been marked as a duplicate of this bug. ***