Are there known issues with wine's XEMBED implementation that might be causing problems or anything that it looks like we might be doing wrong? Here's part of the code too for future reference:
Code: Select all
Display* display = XOpenDisplay(nullptr);
Window parent = reinterpret_cast<Window>(ptr);
port->sendRequest();
port->waitResponse();
rect_ = *reinterpret_cast<ERect*>(frame->data);
XResizeWindow(display, parent, rect_.right - rect_.left,
rect_.bottom - rect_.top);
XSync(display, false);
// FIXME without this ugly delay, the VST window sometimes stays black.
usleep(100000);
Window child = frame->value;
XReparentWindow(display, child, parent, 0, 0);
sendXembedMessage(display, child, XEMBED_EMBEDDED_NOTIFY, 0, parent, 0);
sendXembedMessage(display, child, XEMBED_FOCUS_OUT, 0, 0, 0);
frame->command = Command::ShowWindow;
port->sendRequest();
port->waitResponse();
// FIXME without this ugly delay, the VST window sometimes stays black.
usleep(100000);
XMapWindow(display, child);
XSync(display, false);
XCloseDisplay(display);