Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.9.0
-
None
Description
QWindows created by QWindow::fromWinId get destroyed with xcb_destroy_window, which is not expected. For instance, it breaks setting a transient parent of a window to a foreign window if the forein window gets deleted during cleanup.
See also https://bugs.kde.org/show_bug.cgi?id=380392
Minimal reproducer, launch with winId of target window as argument.
#include <QApplication> #include <QWindow> int main(int argc, char *argv[]) { QApplication app(argc, argv); delete QWindow::fromWinId(strtol(argv[1], nullptr, 0)); }
With Qt < 5.9.0, nothing happens. With Qt 5.9.0 however, the target window disappears.
With a breakpoint on xcb_destroy_window I can confirm that it's called with 5.9.0 but not with earlier versions.