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 335912 - mousewheel scrolls menus without arrows
mousewheel scrolls menus without arrows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
unspecified
Other Linux
: Normal trivial
: ---
Assigned To: gtk-bugs
gtk-bugs
: 336156 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-25 00:55 UTC by Benjamin Berg
Modified: 2006-03-27 17:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing the bug (653 bytes, patch)
2006-03-27 16:48 UTC, Michael Natterer
none Details | Review

Description Benjamin Berg 2006-03-25 00:55:29 UTC
It is possible to scroll menus that do not have any up/down arrows with the mouse wheel.

 1. open a menu, this can be a a normal menu, a popup menu, or even a combobox
 2. use the mousewheel to scroll.

This only happens in CVS, but not in 2.8.13.
Comment 1 Matthias Clasen 2006-03-25 15:28:55 UTC
Awesome bug.

Mitch, I guess this is due to your menu changes, can you take a look ?
Comment 2 Michael Natterer 2006-03-27 11:48:25 UTC
That's just great, can't we keep it as easter egg? ;)

I'm looking into it.
Comment 3 Michael Natterer 2006-03-27 16:48:56 UTC
Created attachment 62132 [details] [review]
Patch fixing the bug

I could dig into gtk_menu_scroll_by() and scroll_to() for a few
million years to figure what exactly I changed in the scroll offset
calculation and why it did not do this before my change.

The patch does a straightforward bail out instead, that's less obscure.
Ok to commit?
Comment 4 Michael Natterer 2006-03-27 17:00:45 UTC
Fixed in CVS:

2006-03-27  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenu.c (gtk_menu_scroll_by): bail out if there is no need
	for scrolling (more obvious than adding additional conditions to
	the scroll offset calculation). Fixes bug #335912.
Comment 5 Matthias Clasen 2006-03-27 17:28:12 UTC
*** Bug 336156 has been marked as a duplicate of this bug. ***