I would like to embed a simple X11 window in a gtk widget.
- I have found this gist https://gist.github.com/pastapojken/69f1e223fd926425f7ae770a95ec79a2 which does almost but not quite what I am looking for: It allows to add gtk widgets inside an X window, not the contrary.
I don't know if I am being clear as I am quite a newbie in both X11 and gtk. So here is a quick schema:

So is this even possible, any advice on how to make this work ? I feel like all I need to do is inherit from GtkWidget and set its GdkWindow to a wrapper of the XID like this:
win = gdk_x11_window_foreign_new_for_display(display, xid);
gtk_widget_set_window(myWidget, win);
But I was not sucessful this way, all I get is two top level windows as shown below.

I am running Fedora 32 on X11, NOT wayland
thanks!