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 728739 - Zoomed scrolling is too easy to trigger by accident
Zoomed scrolling is too easy to trigger by accident
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkRange
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
: 709596 728373 731800 734055 sd 736828 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-22 17:07 UTC by Tony Houghton
Modified: 2015-04-19 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
range: set initial position to current position when enabling zoom (1.62 KB, patch)
2015-02-23 00:59 UTC, Sebastian Keller
none Details | Review

Description Tony Houghton 2014-04-22 17:07:34 UTC
When I drag a scrollbar with the mouse it sometimes goes into fine adjustment mode even though I'm not pressing shift. I can't find anything consistent that triggers this behaviour, it just seems random.
Comment 1 Matthias Clasen 2014-04-22 23:58:28 UTC
It is triggered after a timeout, if you press and don't move
Comment 2 Tony Houghton 2014-04-26 12:14:58 UTC
Thanks. Just me being a bit silly then. I realise this feature can be useful, but I find it a bit annoying at the moment. Is there a way to do any of the following (in order of preference):

Increase the timeout.

Only activate the feature with shift, not with a timeout.

Disable it altogether.

Please consider this an enhancement request for at least one of the above to be made configurable, or at least make the hard-coded timeout longer if you're against adding settings.
Comment 3 Garrett Regier 2014-09-25 23:01:30 UTC
*** Bug 709596 has been marked as a duplicate of this bug. ***
Comment 4 Garrett Regier 2014-09-25 23:01:45 UTC
*** Bug 722438 has been marked as a duplicate of this bug. ***
Comment 5 Garrett Regier 2014-09-25 23:01:51 UTC
*** Bug 734055 has been marked as a duplicate of this bug. ***
Comment 6 Garrett Regier 2014-09-25 23:01:57 UTC
*** Bug 735677 has been marked as a duplicate of this bug. ***
Comment 7 Garrett Regier 2014-09-25 23:02:03 UTC
*** Bug 736828 has been marked as a duplicate of this bug. ***
Comment 8 Garrett Regier 2014-09-25 23:02:14 UTC
*** Bug 731800 has been marked as a duplicate of this bug. ***
Comment 9 Hashem Nasarat 2014-09-25 23:22:23 UTC
The gtk_gesture_long_press in gtkrange.c is responsible for this bug. Perhaps there should be a way to reduce the distance the pointer can travel before the gesture is cancelled, or to increase timeout before the gesture is emitted.

In gtkgesturelongpress.c the timeout (delay) is set by:

  g_object_get (gtk_widget_get_settings (widget),
		"gtk-long-press-time", &delay, NULL);

so if anyone wants a workaround, you can add

[Settings]
gtk-long-press-time = 5000

to ~/.config/gtk-3.0/settings.ini

to change the timeout to 5 seconds.
Comment 10 Hedayat Vatankhah 2014-09-26 10:50:25 UTC
Since my bug (#736828) is marked as duplicate of this bug, I'll add some details here:
Not only zoom mode is activated while there is some movement, but when it is triggered, it cancels the movement which is already happened, which is much much worse than undesired enabling of zoom mode itself. I might be able to live with undesired change, but not when the contents jump back to the initial position of scroll bar. (Actually, IMHO this is a separate bug and it should not have been marked as duplicate of this one. My bug was not about when this mode is triggered, but about what happens after triggering this mode).
Comment 11 Christoph Reiter (lazka) 2014-09-26 12:13:49 UTC
I usually trigger it for gnome-terminal with a long scrollback.

* Scroll up by a few pixels
* Notice that it scrolls way to fast due to long scroll back
* Adjust and scroll down again to the point wanted
* Zoom mode kicks in and resets me back to where I started :(
Comment 12 keine.werbung 2014-09-29 09:23:52 UTC
Thanks for the "work-around" with gtk-long-press-time.
I'm using GTK 3.10 so I cannot test this yet.

Anyway, it would be good if it was possible to disable this "zoom mode" completely.
Sorry but I think this feature is more annoying than useful for most users because the behaviour is not intuitive at all.

My use case is the following:
- I open a PDF file in evince for reading.
- I grab the scrollbar to slowly move down first but potentially quickly jump further in the document later on (while keeping the mouse button pressed).

This does not work with the zoom mode, because once scrolling slowly it prevents the user from scrolling faster later.
Thus the maximum scroll position is limited by the screen size.

Moreover, this behaviour is inconsistent with every other GUI toolkit (that I know of), and leads to different scroll bar behaviour even on the same desktop.
Comment 13 Alex Băluț 2014-10-05 20:32:12 UTC
The automatical activation of the zoom mode is very annoying. 

Isn't everybody using the mouse wheel to fine-scroll? Why exactly is this automatical activation of the zoom mode better?

I never want to use the zoom mode. Please allow disabling it.
Comment 14 Sébastien Wilmet 2014-10-22 14:21:05 UTC
See bug #722438 for adding a setting to gnome-tweak-tool.
Comment 15 Sebastian Keller 2015-02-23 00:59:16 UTC
Created attachment 297612 [details] [review]
range: set initial position to current position when enabling zoom

This is a fix for the scrollbar jumping back when zoom mode gets activated as mentioned in comment 10. Please be extra cautious when reviewing since this is just a patch I hacked together quickly when this was mentioned on IRC.
Comment 16 Matthias Clasen 2015-02-23 02:53:32 UTC
Can you try if this works just the same ? I can't really reproduce the 'jumping' problem, so I can't test this myself.


diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 404dc3a..bd95ee9 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2437,7 +2437,12 @@ gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture,
                                       gdouble              y,
                                       GtkRange            *range)
 {
-  update_zoom_state (range, TRUE);
+  if (!range->priv->zoom)
+    {
+      /* unset initial position so it can be calculated */
+      range->priv->slide_initial_slider_position = -1;
+      update_zoom_state (range, TRUE);
+    }
 }
 
 static void
Comment 17 Sebastian Keller 2015-02-23 03:24:14 UTC
That's actually what my first attempt at fixing this looked like, too. When that didn't work I tried to copy what gtk_range_multipress_gesture_pressed to initialize the positions.
Comment 18 Matthias Clasen 2015-02-25 00:12:15 UTC
I think I'll declare this fixed for now - the timeout is now twice as long.
Comment 19 Hedayat Vatankhah 2015-02-25 05:30:28 UTC
Is the "jump" problem also fixed? (The patch was merged?).
Comment 20 Matthias Clasen 2015-02-25 14:20:44 UTC
yes
Comment 21 Emmanuele Bassi (:ebassi) 2015-03-10 09:56:32 UTC
*** Bug 728373 has been marked as a duplicate of this bug. ***