From f7293da06ceecc236d000389e7115f5cc42cafa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Thu, 23 May 2013 10:46:48 +0300 Subject: Fix creating new QWS surface only when it does not exist already Calling createSurface(const QString &key, const QByteArray &data) function is needed when starting/creating new server/client application, and changes to region sizes (and memory allocation) after that is handled by QWS surfaces themself inside setGeometry(const QRect &rect) function. Task-number: QTBUG-31254 Change-Id: I97c78ebe83b2aa9ab9e4ffc8a9987ab2528f8cf1 Reviewed-by: Paul Olav Tvete --- src/gui/embedded/qwindowsystem_qws.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/embedded/qwindowsystem_qws.cpp b/src/gui/embedded/qwindowsystem_qws.cpp index 894cace..487dc73 100644 --- a/src/gui/embedded/qwindowsystem_qws.cpp +++ b/src/gui/embedded/qwindowsystem_qws.cpp @@ -3885,8 +3885,13 @@ void QWSServerPrivate::request_region(int wid, const QString &surfaceKey, const bool wasOpaque = changingw->opaque; - changingw->createSurface(surfaceKey, surfaceData); QWSWindowSurface *surface = changingw->windowSurface(); + if (!surface) { + changingw->createSurface(surfaceKey, surfaceData); + surface = changingw->windowSurface(); + } else { + surface->setPermanentState(surfaceData); + } changingw->opaque = surface->isOpaque(); -- cgit v0.12