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 92387 - unfriendly drag-n-drop in textview - scrolls too fast
unfriendly drag-n-drop in textview - scrolls too fast
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.0.x
Other All
: Normal normal
: Medium fix
Assigned To: gtk-bugs
gtk-bugs
: 311832 355980 358026 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-09-03 10:07 UTC by Arnaud Charlet
Modified: 2006-12-25 03:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (5.06 KB, patch)
2006-10-11 17:14 UTC, Carlos Garnacho
none Details | Review

Description Arnaud Charlet 2002-09-03 10:07:11 UTC
Using e.g. testtext, load a file (e.g. 3DRings.xpm), select some lines,
then start draging the selection, the following will happen:

As soon as you move the mouse on or after line 21, the text is scrolled
*very* rapidly.

There are two issues here: it seems that the automatic scrolling
could probably start 3 or 4 lines later, as most editors do; the
scrolling while dragging is too fast for any human being, so it is
virtually impossible to drop text at the right place.

Arno
Comment 1 Owen Taylor 2003-06-05 16:34:56 UTC
Someone would have to experiment to find the values that work
best.
Comment 2 Arnaud Charlet 2004-03-02 09:15:19 UTC
Any chance to have this PR looked at rather than postponed ?

Arno
Comment 3 Owen Taylor 2004-03-08 21:46:59 UTC
Yeah, if you provide a patch.
Comment 4 Paolo Borelli 2005-07-28 09:08:52 UTC
*** Bug 311832 has been marked as a duplicate of this bug. ***
Comment 5 Tomislav Jonjic 2005-07-29 09:34:17 UTC
Bug 50233 also tracks this. I have attached there a (very experimental
and quickly hacked) patch that tries to fix scrolling issues in general
and this one in particular. I will try to have another look at it.
Comment 6 Sebastien Bacher 2006-08-31 17:44:45 UTC
Ubuntu bug about that: https://launchpad.net/products/gtk/+bug/58345
Comment 7 Paolo Borelli 2006-10-07 11:04:36 UTC
*** Bug 355980 has been marked as a duplicate of this bug. ***
Comment 8 Carlos Garnacho 2006-10-11 17:14:31 UTC
Created attachment 74499 [details] [review]
patch

With this patch, when the pointer moves past a threshold near the borders it begins the scrolling, but the scroll speed is relative to the separation between the pointer and the border (the closer to it, the faster).

The patch also gets rid of the scrolling code in the drag_motion handler, I never understood very well why should shaking the mouse make scrolling faster during DnD/selection/etc...

I've been playing a bit with this patch and IMHO it improves the DnD experience a lot.
Comment 9 Carlos Garnacho 2006-10-11 17:27:10 UTC
An additional thought, it would be nice to make common code for the widgets with native scrolling support
Comment 10 Paolo Borelli 2006-12-24 19:35:50 UTC
*** Bug 358026 has been marked as a duplicate of this bug. ***
Comment 11 Matthias Clasen 2006-12-25 03:58:33 UTC
2006-12-24  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c: Improve the DND scrolling
        behaviour.  (#92387, Carlos Garnacho Parro)