Create the window when needed
We need to create the XWindow here to avoid crashes, when resizing the backing store before creating the window. Change-Id: Ib8d9efca3552e5a91f5f63a9262449080ae301e5 Reviewed-on: http://codereview.qt-project.org/5259 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
21747af805
commit
e915b7924f
@ -291,7 +291,12 @@ void QXcbBackingStore::resize(const QSize &size, const QRegion &)
|
||||
Q_XCB_NOOP(connection());
|
||||
|
||||
QXcbScreen *screen = static_cast<QXcbScreen *>(window()->screen()->handle());
|
||||
QXcbWindow* win = static_cast<QXcbWindow *>(window()->handle());
|
||||
QPlatformWindow *pw = window()->handle();
|
||||
if (!pw) {
|
||||
window()->create();
|
||||
pw = window()->handle();
|
||||
}
|
||||
QXcbWindow* win = static_cast<QXcbWindow *>(pw);
|
||||
|
||||
delete m_image;
|
||||
m_image = new QXcbShmImage(screen, size, win->depth(), win->imageFormat());
|
||||
|
Loading…
Reference in New Issue
Block a user