Comment 2 for bug 1564767

Revision history for this message
Alberto Mardegan (mardy) wrote :

It looks like the bug is in QtBase: in the XCB plugin, the handleConfigureNotifyEvent() method initially wants to find out what is the new screen for the window, but due to a bug, it gets a NULL screen and decides to return from the function without processing the size changes. The reason for the failure (that is, the reason why we get NULL as a screen) is that the parentScreen() method doesn't take foreign windows into account: when we are embedding windows with the XEMBED protocol, the parent window is the embedder, which might live in another process; Qt does not know anything about this window other than its numeric ID, meaning that it doesn't know its screen either.

Therefore, we need to special-case these windows, and make sure that parentScreen() returns a sensible value.

Note that the patch doesn't need upstreaming: the Qt 5.6 code is already quite different (it doesn't even call the parentScreen() method here) and might be already fine. I'll test it with a local build, and report a bug to the Qt bugtracker in case.