GNOME Bugzilla – Bug 677339
GTK+ 3 documentation wrong about GtkWidget scroll-event signal
Last modified: 2012-11-22 21:38:13 UTC
it looks like the scroll-event behavior had been changed compared to GTK2, and the signal is now filtered by GDK_SCROLL_MASK instead of GDK_BUTTON_PRESS_MASK. but the documentation is stating "To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask".
So you refer to http://developer.gnome.org/gtk3/3.4/GtkWidget.html#GtkWidget-scroll-event ? (Exact links are always welcome.)
yes, exactly.
Created attachment 229648 [details] [review] fix the documnetation coment This was changed in GTK+ 3.3.18, in commit 77cbc980445f52632f2aa3d5076e351c2d4be5c5: Author: Carlos Garnacho <carlosg@gnome.org> Date: Tue Jan 24 00:28:25 2012 +0100 gdk: update csw event mask filter to handle smooth scroll Events of type GDK_SCROLL will be received if the client side window event mask has either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK. GDK_BUTTON_PRESS_MASK has been removed from type_masks[GDK_SCROLL] as that bit is often set for other-than-scrolling purposes, and yet have the window receive scroll events. In GTK+, this forces non-smooth events bubbling, even if the widgets above want smooth events, and legitimately set GDK_[SMOOTH_]SCROLL_MASK. The attached patch corrects the documentation.
Review of attachment 229648 [details] [review]: sure
Comment on attachment 229648 [details] [review] fix the documnetation coment Thanks, pushed to master and gtk-3-6 as commits e677cee28f14600336c271b2d74a1d82df4b47a9 and 92f536b907c25fabec79181e2f617c27ca0b4ff9.