GNOME Bugzilla – Bug 737175
most horizontal sliders are inverted when scrolled with mouse wheel
Last modified: 2017-12-19 21:22:18 UTC
In most applications horizontal sliders react inverted on scroll functionality, examples are rhythmbox (song progress slider), gnome-control-center (sound, keyboard, mouse&touchpad,...). If you move the mouse cursor over the slider and scroll UP you expect it to increase value (song go +xx seconds ..., mouse speed goes UP (faster), keyboard delay, speed, cursor blinking, volume up/higher), but everything goes down to lower values. I'm not sure if I selected right component for this, please re-assign if needed. Also very important in gnome-shell user/power menu (top right corner) there are two sliders on my system for brightness and volume they work as expected (scroll UP they increase values, scroll DOWN they decrease value), so inverted compared to those inside applications, control-center settings... This is tested on f21 (3.13.92), same behavior with external mouse, or touchpad (edge scrolling)
Created attachment 301629 [details] [review] GtkRange: fix horizontal scrolling
Attachment 301629 [details] pushed as 422d872 - GtkRange: fix horizontal scrolling
What relevance did this patch have to the reported bug? The bug was this: * Scrolling UP currently causes a decrement in value, but it should increment. What was changed here was this: * Scrolling LEFT should cause a decrement in value. The latter is correct, but it doesn't address the former, which is still present and still counter to nearly everyone's expectations, I would imagine. Bug 788905 addresses horizontal scrolling causing the value to change in the wrong direction, and the patch I'm currently testing for that also fixes this.
nevermind, I had forgotten that vertical Ranges default to the lower bound being at the top and the upper at the bottom; the first thing I do when using a vertical Range is to set is as inverted to fix that. So, there's still a bug, but it's not the one reported here - closing to put the fix for that in Bug 788905
(In reply to Daniel Boles from comment #3) > * Scrolling UP currently causes a decrement in value, but it should > increment. This is still an issue, on the path that uses scroll directions (not precise deltas). I'm on win32, which uses this path (unlike GNOME), and scrolling the mouse up/down on a horizontal Scale cause movement left/right, which indicates there's *still* a bug here, despite the many patches that have tried to resolve it... The offending path appears to be this: else if (gdk_event_get_scroll_direction ((GdkEvent *) event, &direction)) { if (direction == GDK_SCROLL_UP || direction == GDK_SCROLL_LEFT) delta = - scroll_unit; else delta = scroll_unit; Surely that UP should be a DOWN? We want Up to convey 'more'. Note that the same logic should also apply to key events, which it currently doesn't, but that's a long-standing bug: Bug 407242
Created attachment 365759 [details] [review] Range: Fix inverted vert scrolling on horiz Ranges Various patches have hit this area, but the path using directions was still negating the delta/decreasing the value as the wheel scrolled up. This is unintuitive & also inconsistent with the path that uses deltas. The wrong behaviour could be observed on e.g. win32 or X11 without WI2. So, only negate the delta when scrolling down (or left), not up, so that scrolling up (or right) will make the value increase for any event type. https://bugzilla.gnome.org/show_bug.cgi?id=737175#c5
Review of attachment 365759 [details] [review]: +1, looks consistent with the smooth scroll paths
Attachment 365759 [details] pushed as 4d18a34 - Range: Fix inverted vert scrolling on horiz Ranges Thanks!
Created attachment 365771 [details] [review] Range: Fix inverted vert scrolling on vert Ranges… The change in the previous patch should only be applied when the Range is oriented horizontally.
Let's try that again without breaking vertical ranges into the bargain this time. Note that inverted horizontal ranges still scroll the wrong way, XI2 or not.
Attachment 365771 [details] pushed as 0e338d3 - Range: Fix inverted vert scrolling on vert Ranges… 2nd time lucky... now onto all the other, related oddities.