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 677339 - GTK+ 3 documentation wrong about GtkWidget scroll-event signal
GTK+ 3 documentation wrong about GtkWidget scroll-event signal
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-06-02 14:55 UTC by Alexey Yakovenko
Modified: 2012-11-22 21:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix the documnetation coment (1009 bytes, patch)
2012-11-22 17:19 UTC, David King
committed Details | Review

Description Alexey Yakovenko 2012-06-02 14:55:54 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".
Comment 1 André Klapper 2012-06-02 15:34:42 UTC
So you refer to http://developer.gnome.org/gtk3/3.4/GtkWidget.html#GtkWidget-scroll-event ? (Exact links are always welcome.)
Comment 2 Alexey Yakovenko 2012-06-02 15:39:52 UTC
yes, exactly.
Comment 3 David King 2012-11-22 17:19:37 UTC
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.
Comment 4 Matthias Clasen 2012-11-22 21:30:47 UTC
Review of attachment 229648 [details] [review]:

sure
Comment 5 David King 2012-11-22 21:38:02 UTC
Comment on attachment 229648 [details] [review]
fix the documnetation coment

Thanks, pushed to master and gtk-3-6 as commits e677cee28f14600336c271b2d74a1d82df4b47a9 and 92f536b907c25fabec79181e2f617c27ca0b4ff9.