GNOME Bugzilla – Bug 733406
gtk_text_view_scroll_mark_onscreen() not working any more
Last modified: 2014-08-03 18:13:47 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.
Bisecting reveals the first bad commit is: https://git.gnome.org/browse/gtk+/commit/?id=6aa851149598961f7e80d204d92f1b4c74783b87
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 ?
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.
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.
Attachment 281343 [details] pushed as 9d7f1ca - textview: Avoid relocating adjustments on ::size-allocate while these are animating