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: Gtk – 4.0: Migrating from GTK 3.x to GTK 4

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.