gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.89k stars 174 forks source link

gtk::Gesture cancel signal handler can get a NULL event sequence #29

Closed sdroege closed 4 years ago

sdroege commented 4 years ago

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3304 . We should override that here for now as nullable.

Was fixed for gtk3 in https://github.com/gtk-rs/gtk/pull/1053

sdroege commented 4 years ago

This should also be fixed in the .gir file since 3.99.1. Are we using an older version? @bilelmoussaoui @BrainBlasted

bilelmoussaoui commented 4 years ago

This should also be fixed in the .gir file since 3.99.1. Are we using an older version? @bilelmoussaoui @BrainBlasted

We are using 3.99.2 iirc

sdroege commented 4 years ago

That should have those annotations and does if I do a build of 3.99.2 myself:

      <glib:signal name="cancel" when="last">
        <doc xml:space="preserve"
             filename="../gtk/gtkgesture.c"
             line="818">This signal is emitted whenever a sequence is cancelled. This usually
happens on active touches when gtk_event_controller_reset() is called
on @gesture (manually, due to grabs...), or the individual @sequence
was claimed by parent widgets' controllers (see gtk_gesture_set_sequence_state()).

@gesture must forget everything about @sequence as a reaction to this signal.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="sequence"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="../gtk/gtkgesture.c"
                 line="821">the #GdkEventSequence that was cancelled</doc>
            <type name="Gdk.EventSequence"/>
          </parameter>
        </parameters>
      </glib:signal>
bilelmoussaoui commented 4 years ago

That's very weird, are those included in the latest snapchot as well (3.99.3)? We should probably regen as the gir-files were updated by @BrainBlasted lately and see if we are still having this issue

sdroege commented 4 years ago

are those included in the latest snapchot as well (3.99.3)?

Yes

sdroege commented 4 years ago

Also when building from git master. I assume our gir files are from 3.99.0 then?

bilelmoussaoui commented 4 years ago

Also when building from git master. I assume our gir files are from 3.99.0 then?

gtk4 is build from git master iirc, I think @BrainBlasted updated to after 99.3 release though

BrainBlasted commented 4 years ago

I'm not sure - I don't think there's been a new SDK since 3.99.3

sdroege commented 4 years ago

But 3.99.3 should have the correct annotations already. So it seems like we have a version right now that nobody knows what exactly it is? :)

BrainBlasted commented 4 years ago

GTK4, GSK4, and GDK4 built from 3.99.2-161-g77d4729483e2ecbe373aa2697cb9b409caf418b9

So before 3.99.3

sdroege commented 4 years ago

Ok, but 3.99.2 and 3.99.3 have the correct annotations if I build locally while inside gir-files they currently don't. That's what is confusing me :)