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 711873 - [introspection] no way to gtk_widget_set_events()
[introspection] no way to gtk_widget_set_events()
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-11-11 23:46 UTC by Thierry Vignaud
Modified: 2018-04-15 00:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thierry Vignaud 2013-11-11 23:46:52 UTC
I have a perl Gtk2 app that uses gtk_widget_set_events():
    my $b = Gtk2::EventBox->new;
    $b->set_events('pointer_motion_mask');

However, with Gtk3, I got:
 Argument "pointer_motion_mask" isn't numeric in subroutine entry at
         /usr/lib/perl5/vendor_perl/5.18.1/x86_64-linux-thread-multi/Glib/Object/Introspection.pm line 59 (#6)

GdkEventMask is a bitfield in Gdk

This suggests that gtk+ is missing overrides for gtk_widget_set_events()
and _add_events() that tell gobject introspection that the "events"
argument is actually of type GdkEventMask.

As a workaround, I'm forced to create an event mask with
Gtk3::Gdk::EventMask->new ("pointer_motion_mask") and then dereference
it to get at the corresponding integer:

    my $b = Gtk3::EventBox->new;
    $b->set_events(${ Gtk3::Gdk::EventMask->new ("pointer_motion_mask") });

This violates encapsulation!
Comment 1 Matthias Clasen 2018-02-10 05:02:56 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 2 Matthias Clasen 2018-04-15 00:19:19 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new