Gettting a Blank Window Sometimes Using XReparentWindow

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
pinkboi
Newbie
Newbie
Posts: 1
Joined: Sun Dec 14, 2014 4:32 pm

Gettting a Blank Window Sometimes Using XReparentWindow

Post by pinkboi »

I don't know if this is the right place to ask but I'm using airwave as a bridge between Windows VSTs and Linux hosts. It mostly works for me, except there are some issues with showing the windows. With my favorite synth, Korg MS-20, it's not even drawing the window. I'm not the original author of the code (for airwave) but I'm interested in helping to fix it. If you look in the file masterunit.cpp, you can see starting around line 324 (case effEditOpen) where it embeds the wine window into the X window. There's even a hack in there to wait, but for my synth that hack is insufficient.

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);
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: Gettting a Blank Window Sometimes Using XReparentWindow

Post by olivierfrdierick »

I hate to say this but Forum Guidelines state:
Do not post questions about third party applications used to install and/or manage Wine. Such applications should provide their own support channels. If you have used one, retest in plain Wine before posting here.
Your question should be directed at airwave developpers.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Gettting a Blank Window Sometimes Using XReparentWindow

Post by dimesio »

There is a valid Wine question here
pinkboi wrote: 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?
but this is not the best place to ask it. Developers rarely read the user's forum. You could try asking on the developer's mailing list. You might also want to look into the Pipelight project, which uses a patched version of Wine to run Windows browser plugins in native browsers.
Locked