summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2013-05-23 07:46:48 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-23 12:24:07 (GMT)
commitf7293da06ceecc236d000389e7115f5cc42cafa1 (patch)
treec968783f95af513644ca5f400f353b165eb66e17 /src
parent9a62d6f2f89ea4c5e6d392d758bb9d7954c644d1 (diff)
downloadQt-f7293da06ceecc236d000389e7115f5cc42cafa1.zip
Qt-f7293da06ceecc236d000389e7115f5cc42cafa1.tar.gz
Qt-f7293da06ceecc236d000389e7115f5cc42cafa1.tar.bz2
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 <paul.tvete@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/embedded/qwindowsystem_qws.cpp7
1 files changed, 6 insertions, 1 deletions
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();