Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 45156

Summary: Wheel scrolling stops short of page bounds.
Product: [Retired] Red Hat Raw Hide Reporter: Ed McKenzie <eem12>
Component: gtk+Assignee: Owen Taylor <otaylor>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-04 20:25:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ed McKenzie 2001-06-20 16:33:02 UTC
Using the scroll wheel in ggv, it's not always possible to hit the top
and/or bottom of a page at certain zoom levels.  Basically, it seems that
if the page position is close enough to the end of the page that another
wheel step would take it beyond the end of the page, scrolling the wheel in
that direction has no effect.

I've seen this in some other apps too (Nautilus), so it could be a gtk bug.

Comment 1 Tim Powers 2001-06-27 20:47:56 UTC
Which version of gtk+ are you using? Also, I can't reproduce this with the ps
files I've used. Do you still have offending doc to send me?

Tim

Comment 2 Ed McKenzie 2001-06-27 22:45:56 UTC
[eem12@trillian eem12]$ rpm -q ggv gtk+ 
ggv-1.0.1-2
gtk+-1.2.9-4
[eem12@trillian eem12]$ 

This is easy for me to reproduce in ggv with a blank document.

Comment 3 Owen Taylor 2002-03-04 23:13:56 UTC
ggv bug; in gtkgs.c

void
gtk_gs_scroll(GtkGS *gs, gint x_delta, gint y_delta)
{
        gfloat hval, vval;

        hval = gs->hadj->value + ((gfloat)x_delta)/gs->width;
        vval = gs->vadj->value + ((gfloat)y_delta)/gs->height;
        if(hval <= gs->hadj->upper - gs->hadj->page_size/2 &&
           hval >= gs->hadj->lower + gs->hadj->page_size/2)
                gtk_adjustment_set_value(gs->hadj, hval);
        if(vval <= gs->vadj->upper - gs->vadj->page_size/2 &&
           vval >= gs->vadj->lower + gs->vadj->page_size/2)
                gtk_adjustment_set_value(gs->vadj, vval);
}

should look more like:

 hval = CLAMP (hval, gs->hadj->lower + gs->hadj->page_size / 2,
               gs->hadj->upper + gs->hadj->page_size / 2);
 gtk_adjustment_set_value (gs->hadj, hval);

Filed upstream as:

 http://bugzilla.gnome.org/show_bug.cgi?id=73454