Czarek wrote:What if you pass an invalid window handle?
Nothing happens. The window simply doesn't appear.
Czarek wrote:From your first post:
- Code: Select all
Window XCreateWindow(
Display* /* display */,
Window /* parent */,
int /* x */, // 0
int /* y */, // 0
unsigned int /* width */, // 800
unsigned int /* height */, // 600
What are the values for Window and Display*?
I'd have to debug to it to know for sure. I'll try to verify that later.
Czarek wrote:A bit late, but now we can see the crucial part of your code - how you create the window. I've looked at your C++ Qt example. You are embedding an external process non-qt control (CEF) directly inside the Qt Widget control. Did you ensure with the Qt documentation that you are allowed to do that? From what I know the QX11EmbedContainer control is designed for this.
I might be wrong, but isn't this what cefclient does, basically? It just sets the Gtk Window as the parent with SetAsChild and doesn't do anything from the Gtk side.
In any case, QWidget::createWindowContainer can create a QWidget from an external window, but I think that's not a requirement for embedding windows inside Qt applications. (EDIT: I'll try to use it anyway, just in case)
Czarek wrote:Also it looks like you are providing GtkWidget window handle, but CEF expects X11 window handle.
No, I'm providing an X11 window handle. See:
https://doc.qt.io/qt-5/qwidget.html#winIdCzarek wrote:One more thing. Sometimes bad code happens to work, same as bugs happen
In regards to -> "it worked in earlier CEF, but now it stopped working - so it must be a CEF bug".
But I only assumed it was a CEF bug after testing the standard 2526 and 2623 builds (as mentioned in my previous post). Before that, I assumed it was some mistake emerging from the customizations I did to CEF and cefsimple.