I was wondering how I could get the X11 window ID for a Gtk Window in gtk4. I have seen other answers before regarding gtk3, but they don't seem to work in the latest gtk4. I found gdk_x11_surface_get_xid
, but I can't pass a GtkWidget
to that. I tried using the GDK_SURFACE
cast, but I get:
invalid cast from 'GtkApplicationWindow' to 'GdkSurface'
Is there any way to resolve this, and get the x11 window id from a GtkWindow?