GNOME Bugzilla – Bug 711873
[introspection] no way to gtk_widget_set_events()
Last modified: 2018-04-15 00:19:19 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!
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.
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