Gtk4 alternative for gtk_overlay_set_overlay _pass_through()

Hi,

I understand that gtk_overlay_set_overlay_pass_through() was removed in gtk4.
I have a GtkImage I’m displaying on top of a GtkBox using GtkOverlay.
Mu box has buttons inside it, so I would like it to receive mouse-click events even when the overlaying image is clicked.
What is now the best-practice way of achieving this behaviour?

See the migration note here: https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-changes-in-gtkoverlay-api

The GtkOverlay :pass-through child property has been replaced by the GtkWidget:can-target property. Note that they have the opposite sense: pass-through == !can-target.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.