gtk_gesture_get_last_event() missing (nullable) annotation for GDKEventSequence arg
@mlundblad
Submitted by Marcus Lundblad Link to original bug (#789218)
Description
In Maps I've tried to implement support for bringing up the context menu on long-press on the view on touch screens with the following code:
this._longPressGesture = new Gtk.GestureLongPress({ widget: this._mapView }); this._longPressGesture.connect('pressed', (function(gesture, x, y) { Mainloop.idle_add((function() { let sequence = gesture.get_last_updated_sequence();
this.popup_at_pointer(gesture.get_last_event(sequence));
}).bind(this));
}).bind(this));
(the idle_add call is to avoid event lock-ups in Clutter).
This currently gives a GIR error as the @sequence argument for gtk_gesture_get_last_event() is not annotated with null, even though gtk_gesture_get_last_updated_sequence() can return null.
Adding the correct GIR annotation in gtkgesture.c fixes this.
Version: 3.22.x