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 733406 - gtk_text_view_scroll_mark_onscreen() not working any more
gtk_text_view_scroll_mark_onscreen() not working any more
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-07-19 15:13 UTC by Volker Sobek (weld)
Modified: 2014-08-03 18:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
textview: Avoid relocating adjustments on ::size-allocate while these are animating (2.32 KB, patch)
2014-07-21 20:47 UTC, Carlos Garnacho
committed Details | Review

Description Volker Sobek (weld) 2014-07-19 15:13:41 UTC
With current gtk+ master this does not scroll the mark on screen any more. (Or maybe the mark isn't were it should be?.)

You can check this with the Automatic Scrolling demo in gtk3-demo.
Comment 1 Volker Sobek (weld) 2014-07-19 17:26:11 UTC
Bisecting reveals the first bad commit is: https://git.gnome.org/browse/gtk+/commit/?id=6aa851149598961f7e80d204d92f1b4c74783b87
Comment 2 Matthias Clasen 2014-07-21 11:09:13 UTC
I can see two problems:

1) The scrolling is 'bouncy'. This is more obvious if you change the timeouts to be a bit longer, around 200. The reason is that we start over our easeout animation every time. It would be much nicer if we could somehow detect the 'repeated restart' condition and switch to a constant speed animation.

2) At least the 'scroll to end' example seems to fail to keep the vscrollbar at the bottom. Not sure whats going on there, accumulating error ?
Comment 3 Carlos Garnacho 2014-07-21 20:47:17 UTC
Created attachment 281343 [details] [review]
textview: Avoid relocating adjustments on ::size-allocate while these are animating

An animation may be scheduled while the textview content changed in size, so the resize
queued would just unset the animation and set the adjusments with a current value,
defeating gtk_text_view_scroll_to_iter(). In this case, just avoid the adjustment change,
as there is a target value on the way.
Comment 4 Matthias Clasen 2014-07-22 10:56:02 UTC
Seems to work fine for the gtk-demo testcase. I wonder why those calls were there in the first place, and if we need a way to change adjustment limits without killing the animation.
Comment 5 Matthias Clasen 2014-08-03 18:13:42 UTC
Attachment 281343 [details] pushed as 9d7f1ca - textview: Avoid relocating adjustments on ::size-allocate while these are animating