Bug#329475: libgtk2.0-0: Unexpected behaviour in wheel scrolling
elmex at x-paste.de
Thu Sep 22 00:44:48 UTC 2005
I have a unexpected behaviour of the mouse wheel scrolling the scrollbar
in some Gtk programs. In one program it scrolls one page, in others (or
even the same, but a different content of the scrolled window) it
scrolls less or much more. (and for example in mozilla only some few
I looked up the source in gtk2 gtk+2.0-2.6.10:
gtk/gtkrange.c, function _gtk_range_get_wheel_delta:
if (GTK_IS_SCROLLBAR (range))
delta = pow (adj->page_size, 2.0 / 3.0);
delta = adj->step_increment * 2;
The behaviour of the scrollbar is changed explicitly
in GtkRange. The problem with pow (adj->page_size, 2.0 / 3.0)
is, that it sets the delta depending on the magnitude of
the value scrollbar uses.
This leads to an unexpected behaviour when scrolling the
scrollbar with the mouse wheel:
the wheel scrolls only by a small amount in windows with
few content (or when the range used by the application is small),
and on other windows, with much content, it scrolls much more.
This leads to scrollbars that look the same and behave the same when
people click on the arrows, the knob or the other areas of the
scrollbar, with the sole exception of the scrollwheel.
In some programs that use the number of entries in a list
for the range it leads to large jumps with many entries
and page-size jumps with less entries.
In programs that use a range < 1, it even scrolls less than
There is also no chance for the developers of Gtk2
programs to directly influence this behaviour.
In contrast the scrollbar documentation says this:
The "step_increment" and "page_increment" fields are used
when the user asks to step down (using the small
stepper arrows) or page down (using for example the PageDown key).
However when the user asks to 'step down' or 'page down'
using the scrollwheel a completly different value is used.
I would find it more logical if a range 0..100, page_size = 10
(currently scrolling 3 pages) would behave exactly the same
as a range 0..10, page_size = 1 (currently scrolling 1 page)
or 0..1, page_size = 0.1 (currently scrolling 1/3 of a page).
It's also questionable to enforce the behaviour of a single subclass
(GtkScrollbar) by selectively changing the behaviour in the super class
For example i would find the default behaviour
adj->step_increment * 2
is deterministic in all cases.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 18.104.22.168
Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages libgtk2.0-0 depends on:
ii libatk1.0-0 1.10.1-2 The ATK accessibility toolkit
ii libc6 2.3.5-4 GNU C Library: Shared libraries an
ii libfontconfig1 2.3.2-1 generic font configuration library
ii libfreetype6 2.1.7-2.1 FreeType 2 font engine, shared lib
ii libglib2.0-0 2.8.0-1 The GLib library of C routines
ii libgtk2.0-bin 2.6.10-1 The programs for the GTK+ graphica
ii libgtk2.0-common 2.6.10-1 Common files for the GTK+ graphica
ii libjpeg62 6b-9 The Independent JPEG Group's JPEG
ii libpango1.0-0 1.8.2-1 Layout and rendering of internatio
ii libpng12-0 1.2.8rel-1 PNG library - runtime
ii libtiff4 3.7.3-1 Tag Image File Format (TIFF) libra
ii libx11-6 4.3.0.dfsg.1-5 X Window System protocol client li
ii libxcursor1 1.1.3-1 X cursor management library
ii libxext6 4.3.0.dfsg.1-5 X Window System miscellaneous exte
ii libxft2 2.1.2-6 FreeType-based font drawing librar
ii libxi6 4.3.0.dfsg.1-5 X Window System Input extension li
ii libxinerama1 6.8.2.dfsg.1-7 X Window System multi-head display
ii libxrandr2 4.3.0.dfsg.1-5 X Window System Resize, Rotate and
ii libxrender1 1:0.9.0-2 X Rendering Extension client libra
ii xlibs 4.3.0.dfsg.1-5 X Window System client libraries m
ii zlib1g 1:22.214.171.124-3 compression library - runtime
-- no debconf information
More information about the Pkg-gnome-maintainers