Developing VST GUI by using SDL2?

Hi

I’m trying to develop a VST plugin GUI by using SDL (Linux initially). In VST 2.x plugin interface, the plugin gets already created window handle it should start using it so I’m looking for a CreateWindowWithHandle(window_handle) function but there is only CreateWindowFrom(void *ptr) and giving window handle (from DAW call) to this function seem to lead to crash/is not working. (the window_handle is an Xlib Window (or an xcb_window_t).)

This page shows how plugins are called (effEditOpen command is send to plugin):

https://github.com/ekenberg/vstminihost/blob/master/source/minieditor.cpp

Do you have any suggestions what I should do?