tests: make xembed/qt-client-raster better

Change-Id: Id45bcfb92eb24c4455cf50497e28312eb87e0f9a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cef9cbdd52d737ce6ff01d12770b38c02a0e331a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2022-07-04 17:48:24 +02:00 committed by Qt Cherry-pick Bot
parent 1c27eaf9b8
commit 1af74fffd0
2 changed files with 3 additions and 1 deletions

View File

@ -18,12 +18,12 @@ int main(int argc, char **argv)
}
RasterWindow window;
window.show();
QWindow *foreign = QWindow::fromWinId(winId);
Q_ASSERT(foreign != 0);
window.setParent(foreign);
window.show();
return app.exec();
}

View File

@ -7,6 +7,8 @@ RasterWindow::RasterWindow(QWindow *parent)
: QWindow(parent)
, m_update_pending(false)
{
winId();
m_backingStore = new QBackingStore(this);
create();