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 165034 - Scrolling when fixed_height_mode is enabled is weird
Scrolling when fixed_height_mode is enabled is weird
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks: 552905
 
 
Reported: 2005-01-23 23:25 UTC by Jorn Baayen
Modified: 2011-02-04 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (3.26 KB, text/plain)
2005-01-26 00:50 UTC, Jorn Baayen
  Details
Patch (1.84 KB, patch)
2005-02-18 23:00 UTC, Jorn Baayen
none Details | Review

Description Jorn Baayen 2005-01-23 23:25:59 UTC
Scrolling down a fixed_height_mode treeview with the keyboard does odd things:
instead of scrolling so that the next row is fully visible, it does not scroll
unless the row is not visible at all. But then when it scrolls, it scrolls so
that the newly visible row is at the top of the view, which is very strange
behaviour.
Comment 1 Jorn Baayen 2005-01-26 00:50:59 UTC
Created attachment 36534 [details]
Testcase

Testcase. Select the treeview and scroll down using the 'down arrow' key. When
you get to the bottom, you will meet the problem.
Comment 2 Jorn Baayen 2005-02-18 23:00:39 UTC
Created attachment 37666 [details] [review]
Patch

The problem seems to be that using fixed height mode not all nodes are marked
as valid, and therefore the scroll algorithm in validate_visible_area gets
used, instead of the one in _scroll_to_cell. These scroll algorithms differ.
Attached patch makes the behaviour consistent.
Comment 3 Sven Neumann 2005-03-22 10:21:09 UTC
Setting target milestone to 2.6.5 since this report has a patch that should at
least be looked at.
Comment 4 Matthias Clasen 2005-06-14 17:20:43 UTC
Moving to 2.8, as Kris thinks his patch is risky
Comment 5 Kristian Rietveld 2005-06-17 22:26:51 UTC
The patch doesn't look right. The current code also deals with rows at the first
and last page of the treeview (those need special treatment wrt adjustments).
Also, simply scrolling through the treeview should not go via the
validate_visible_area() path.

So, I think the best thing to do is to just mark all rows valid in fixed height.
I've nearly finished a patch to do this, only thing left is handling rows which
have been invalidated along the way and need to be validated again.
Comment 6 Kristian Rietveld 2005-07-08 19:17:36 UTC
Fixed on CVS HEAD.