You can look at the source of these GTK features and see how they are implemented for the X11 backend:
gtk_window_set_keep_above()
gtk_window_set_keep_below()
gtk_window_set_transient_for()
I think this is the best way to find out how you can do this, of course, the GTK solution should be portable.
source
share