Skip to content

Adapt to Gdk::TopLevel changes

Andreas Persson requested to merge andreas56/gtkmm:gdk-toplevel into master

This only contains minimal changes to fix compilation errors. The new class ToplevelSize and the new signal in Toplevel are not wrapped yet.

I made an attempt to wrap the new class and signal, but I ran in to multiple problems:

  • The ToplevelSize class is not a GObject, so I wasn't sure which macro to use - I only found _CLASS_GENERIC that worked.

  • I wasn't able to create a Gdk::Toplevel object to test with. In Gtk, GdkToplevel is an interface, and I can do for example GDK_TOPLEVEL(gdk_surface_new_toplevel(display)), but in Gtkmm I don't know how to get an Gdk::Toplevel instance, as I get errors like this when I try: "Glib::wrap_auto_interface(): The C++ instance (N3Gdk7SurfaceE) does not dynamic_cast to the interface.". I guess Gdk::Toplevel is a bit wrong, but I don't know the solution. Maybe Toplevel should be a subclass of Surface?

  • generate_defs_gdk seems to create wrong info for the parameters of the new Toplevel compute-size signal. It creates:

    (parameters '("GdkToplevelSize" "p0") )

where I think it should be:

(parameters '("GdkToplevel*" "p0") '("GdkToplevelSize*" "p1")

Merge request reports