Hello community,

here is the log from the commit of package kwayland for openSUSE:Factory 
checked in at 2017-09-19 16:27:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwayland (Old)
 and      /work/SRC/openSUSE:Factory/.kwayland.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kwayland"

Tue Sep 19 16:27:08 2017 rev:40 rq:526676 version:5.38.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kwayland/kwayland.changes        2017-08-24 
17:58:57.592978347 +0200
+++ /work/SRC/openSUSE:Factory/.kwayland.new/kwayland.changes   2017-09-19 
16:27:09.719297202 +0200
@@ -1,0 +2,14 @@
+Tue Sep 12 07:11:18 CEST 2017 - lbeltr...@kde.org
+
+- Update to 5.38.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.38.0.php
+- Changes since 5.37.0:
+  * Treat input RGB buffers as premultiplied
+  * Update SurfaceInterface outputs when an output global gets destroyed
+  * KWayland::Client::Surface track output destruction
+  * Do not leak symbols of pimpl classes, protect with Q_DECL_HIDDEN
+  * Avoid sending data offers from an invalid source. (kde#383054)
+
+-------------------------------------------------------------------

Old:
----
  kwayland-5.37.0.tar.xz

New:
----
  kwayland-5.38.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kwayland.spec ++++++
--- /var/tmp/diff_new_pack.06Dygz/_old  2017-09-19 16:27:10.379203693 +0200
+++ /var/tmp/diff_new_pack.06Dygz/_new  2017-09-19 16:27:10.383203127 +0200
@@ -16,9 +16,13 @@
 #
 
 
-%define _tar_path 5.37
+%define _tar_path 5.38
+# Full KF5 version (e.g. 5.33.0)
+%{!?_kf5_version: %global _kf5_version %{version}}
+# Last major and minor KF5 version (e.g. 5.33)
+%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           kwayland
-Version:        5.37.0
+Version:        5.38.0
 Release:        0
 Summary:        KDE Wayland library
 License:        LGPL-2.1+
@@ -27,7 +31,7 @@
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
 BuildRequires:  cmake >= 3.0
-BuildRequires:  extra-cmake-modules >= %{_tar_path}
+BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem
 BuildRequires:  libQt5Gui-private-headers-devel >= 5.6.0

++++++ kwayland-5.37.0.tar.xz -> kwayland-5.38.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/CMakeLists.txt 
new/kwayland-5.38.0/CMakeLists.txt
--- old/kwayland-5.37.0/CMakeLists.txt  2017-08-06 18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/CMakeLists.txt  2017-09-02 11:39:02.000000000 +0200
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.37.0") # handled by release scripts
+set(KF5_VERSION "5.38.0") # handled by release scripts
 project(KWayland VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.37.0  NO_MODULE)
+find_package(ECM 5.38.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/autotests/client/test_drag_drop.cpp 
new/kwayland-5.38.0/autotests/client/test_drag_drop.cpp
--- old/kwayland-5.37.0/autotests/client/test_drag_drop.cpp     2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_drag_drop.cpp     2017-09-02 
11:39:02.000000000 +0200
@@ -187,7 +187,7 @@
     using namespace KWayland::Client;
     auto s = m_compositor->createSurface();
 
-    QImage img(QSize(100, 200), QImage::Format_ARGB32);
+    QImage img(QSize(100, 200), QImage::Format_RGB32);
     img.fill(Qt::red);
     s->attachBuffer(m_shm->createBuffer(img));
     s->damage(QRect(0, 0, 100, 200));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/autotests/client/test_shadow.cpp 
new/kwayland-5.38.0/autotests/client/test_shadow.cpp
--- old/kwayland-5.37.0/autotests/client/test_shadow.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_shadow.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -204,28 +204,28 @@
 
     // now create the shadow
     QScopedPointer<Shadow> shadow(m_shadow->createShadow(surface.data()));
-    QImage topLeftImage(QSize(10, 10), QImage::Format_ARGB32);
+    QImage topLeftImage(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     topLeftImage.fill(Qt::white);
     shadow->attachTopLeft(m_shm->createBuffer(topLeftImage));
-    QImage topImage(QSize(11, 11), QImage::Format_ARGB32);
+    QImage topImage(QSize(11, 11), QImage::Format_ARGB32_Premultiplied);
     topImage.fill(Qt::black);
     shadow->attachTop(m_shm->createBuffer(topImage));
-    QImage topRightImage(QSize(12, 12), QImage::Format_ARGB32);
+    QImage topRightImage(QSize(12, 12), QImage::Format_ARGB32_Premultiplied);
     topRightImage.fill(Qt::red);
     shadow->attachTopRight(m_shm->createBuffer(topRightImage));
-    QImage rightImage(QSize(13, 13), QImage::Format_ARGB32);
+    QImage rightImage(QSize(13, 13), QImage::Format_ARGB32_Premultiplied);
     rightImage.fill(Qt::darkRed);
     shadow->attachRight(m_shm->createBuffer(rightImage));
-    QImage bottomRightImage(QSize(14, 14), QImage::Format_ARGB32);
+    QImage bottomRightImage(QSize(14, 14), 
QImage::Format_ARGB32_Premultiplied);
     bottomRightImage.fill(Qt::green);
     shadow->attachBottomRight(m_shm->createBuffer(bottomRightImage));
-    QImage bottomImage(QSize(15, 15), QImage::Format_ARGB32);
+    QImage bottomImage(QSize(15, 15), QImage::Format_ARGB32_Premultiplied);
     bottomImage.fill(Qt::darkGreen);
     shadow->attachBottom(m_shm->createBuffer(bottomImage));
-    QImage bottomLeftImage(QSize(16, 16), QImage::Format_ARGB32);
+    QImage bottomLeftImage(QSize(16, 16), QImage::Format_ARGB32_Premultiplied);
     bottomLeftImage.fill(Qt::blue);
     shadow->attachBottomLeft(m_shm->createBuffer(bottomLeftImage));
-    QImage leftImage(QSize(17, 17), QImage::Format_ARGB32);
+    QImage leftImage(QSize(17, 17), QImage::Format_ARGB32_Premultiplied);
     leftImage.fill(Qt::darkBlue);
     shadow->attachLeft(m_shm->createBuffer(leftImage));
     shadow->setOffsets(QMarginsF(1, 2, 3, 4));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/autotests/client/test_shm_pool.cpp 
new/kwayland-5.38.0/autotests/client/test_shm_pool.cpp
--- old/kwayland-5.37.0/autotests/client/test_shm_pool.cpp      2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_shm_pool.cpp      2017-09-02 
11:39:02.000000000 +0200
@@ -44,6 +44,7 @@
     void testCreateBufferNullSize();
     void testCreateBufferInvalidSize();
     void testCreateBufferFromImage();
+    void testCreateBufferFromImageWithAlpha();
     void testCreateBufferFromData();
     void testReuseBuffer();
     void testDestroy();
@@ -154,33 +155,46 @@
 void TestShmPool::testCreateBufferFromImage()
 {
     QVERIFY(m_shmPool->isValid());
-    QImage img(24, 24, QImage::Format_ARGB32);
+    QImage img(24, 24, QImage::Format_RGB32);
     img.fill(Qt::black);
     QVERIFY(!img.isNull());
     auto buffer = m_shmPool->createBuffer(img).toStrongRef();
     QVERIFY(buffer);
     QCOMPARE(buffer->size(), img.size());
-    QImage img2(buffer->address(), img.width(), img.height(), 
QImage::Format_ARGB32);
+    QImage img2(buffer->address(), img.width(), img.height(), 
QImage::Format_RGB32);
+    QCOMPARE(img2, img);
+}
+
+void TestShmPool::testCreateBufferFromImageWithAlpha()
+{
+    QVERIFY(m_shmPool->isValid());
+    QImage img(24, 24, QImage::Format_ARGB32_Premultiplied);
+    img.fill(QColor(255,0,0,100)); //red with alpha
+    QVERIFY(!img.isNull());
+    auto buffer = m_shmPool->createBuffer(img).toStrongRef();
+    QVERIFY(buffer);
+    QCOMPARE(buffer->size(), img.size());
+    QImage img2(buffer->address(), img.width(), img.height(), 
QImage::Format_ARGB32_Premultiplied);
     QCOMPARE(img2, img);
 }
 
 void TestShmPool::testCreateBufferFromData()
 {
     QVERIFY(m_shmPool->isValid());
-    QImage img(24, 24, QImage::Format_ARGB32);
+    QImage img(24, 24, QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     QVERIFY(!img.isNull());
     auto buffer = m_shmPool->createBuffer(img.size(), img.bytesPerLine(), 
img.constBits()).toStrongRef();
     QVERIFY(buffer);
     QCOMPARE(buffer->size(), img.size());
-    QImage img2(buffer->address(), img.width(), img.height(), 
QImage::Format_ARGB32);
+    QImage img2(buffer->address(), img.width(), img.height(), 
QImage::Format_ARGB32_Premultiplied);
     QCOMPARE(img2, img);
 }
 
 void TestShmPool::testReuseBuffer()
 {
     QVERIFY(m_shmPool->isValid());
-    QImage img(24, 24, QImage::Format_ARGB32);
+    QImage img(24, 24, QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     QVERIFY(!img.isNull());
     auto buffer = m_shmPool->createBuffer(img).toStrongRef();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwayland-5.37.0/autotests/client/test_wayland_seat.cpp 
new/kwayland-5.38.0/autotests/client/test_wayland_seat.cpp
--- old/kwayland-5.37.0/autotests/client/test_wayland_seat.cpp  2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_wayland_seat.cpp  2017-09-02 
11:39:02.000000000 +0200
@@ -830,7 +830,7 @@
 
     // let's map the surfaces
     auto render = [this] (Surface *s, const QSize &size) {
-        QImage image(size, QImage::Format_ARGB32);
+        QImage image(size, QImage::Format_ARGB32_Premultiplied);
         image.fill(Qt::black);
         s->attachBuffer(m_shm->createBuffer(image));
         s->damage(QRect(QPoint(0, 0), size));
@@ -1171,7 +1171,7 @@
 
     // let's map the surfaces
     auto render = [this] (Surface *s, const QSize &size) {
-        QImage image(size, QImage::Format_ARGB32);
+        QImage image(size, QImage::Format_ARGB32_Premultiplied);
         image.fill(Qt::black);
         s->attachBuffer(m_shm->createBuffer(image));
         s->damage(QRect(QPoint(0, 0), size));
@@ -1328,7 +1328,7 @@
     QCOMPARE(cursor->surface()->buffer()->data(), img);
 
     // and add another image to the surface
-    QImage blue(QSize(10, 20), QImage::Format_ARGB32);
+    QImage blue(QSize(10, 20), QImage::Format_ARGB32_Premultiplied);
     blue.fill(Qt::blue);
     cursorSurface->attachBuffer(m_shm->createBuffer(blue));
     cursorSurface->damage(QRect(0, 0, 10, 20));
@@ -1382,7 +1382,7 @@
     // now let's set the cursor
     Surface *cursorSurface = m_compositor->createSurface(m_compositor);
     QVERIFY(cursorSurface);
-    QImage red(QSize(10, 10), QImage::Format_ARGB32);
+    QImage red(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     red.fill(Qt::red);
     cursorSurface->attachBuffer(m_shm->createBuffer(red));
     cursorSurface->damage(QRect(0, 0, 10, 10));
@@ -1392,7 +1392,7 @@
     QCOMPARE(pointer->cursor()->surface()->buffer()->data(), red);
 
     // and damage the surface
-    QImage blue(QSize(10, 10), QImage::Format_ARGB32);
+    QImage blue(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     blue.fill(Qt::blue);
     cursorSurface->attachBuffer(m_shm->createBuffer(blue));
     cursorSurface->damage(QRect(0, 0, 10, 10));
@@ -1821,6 +1821,9 @@
     QVERIFY(cancelledSpy.isValid());
     m_seatInterface->setSelection(ddi);
     QVERIFY(cancelledSpy.wait());
+
+    // Copy already cleared selection,  BUG 383054
+    ddi->sendSelection(ddi);
 }
 
 void TestWaylandSeat::testSelectionNoDataSource()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwayland-5.37.0/autotests/client/test_wayland_subsurface.cpp 
new/kwayland-5.38.0/autotests/client/test_wayland_subsurface.cpp
--- old/kwayland-5.37.0/autotests/client/test_wayland_subsurface.cpp    
2017-08-06 18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_wayland_subsurface.cpp    
2017-09-02 11:39:02.000000000 +0200
@@ -619,7 +619,7 @@
     QSignalSpy childDamagedSpy(childSurface, &SurfaceInterface::damaged);
     QVERIFY(childDamagedSpy.isValid());
 
-    QImage image(QSize(200, 200), QImage::Format_ARGB32);
+    QImage image(QSize(200, 200), QImage::Format_ARGB32_Premultiplied);
     image.fill(Qt::black);
     surface->attachBuffer(m_shm->createBuffer(image));
     surface->damage(QRect(0, 0, 200, 200));
@@ -632,7 +632,7 @@
     QVERIFY(!childSurface->isMapped());
     QVERIFY(!parentSurface->isMapped());
 
-    QImage image2(QSize(400, 400), QImage::Format_ARGB32);
+    QImage image2(QSize(400, 400), QImage::Format_ARGB32_Premultiplied);
     image2.fill(Qt::red);
     parent->attachBuffer(m_shm->createBuffer(image2));
     parent->damage(QRect(0, 0, 400, 400));
@@ -681,7 +681,7 @@
     QSignalSpy childDamagedSpy(childSurface, &SurfaceInterface::damaged);
     QVERIFY(childDamagedSpy.isValid());
 
-    QImage image(QSize(200, 200), QImage::Format_ARGB32);
+    QImage image(QSize(200, 200), QImage::Format_ARGB32_Premultiplied);
     image.fill(Qt::black);
     surface->attachBuffer(m_shm->createBuffer(image));
     surface->damage(QRect(0, 0, 200, 200));
@@ -853,7 +853,7 @@
     // first map the child, should not map it
     QSignalSpy child3DamageSpy(child3->surface().data(), 
&SurfaceInterface::damaged);
     QVERIFY(child3DamageSpy.isValid());
-    QImage image(QSize(200, 200), QImage::Format_ARGB32);
+    QImage image(QSize(200, 200), QImage::Format_ARGB32_Premultiplied);
     image.fill(Qt::black);
     childLevel3Surface->attachBuffer(m_shm->createBuffer(image));
     childLevel3Surface->damage(QRect(0, 0, 200, 200));
@@ -1025,7 +1025,7 @@
     m_subCompositor->createSubSurface(child.data(), parent.data());
 
     // let's damage this surface, will be in sub-surface pending state
-    QImage image(QSize(100, 100), QImage::Format_ARGB32);
+    QImage image(QSize(100, 100), QImage::Format_ARGB32_Premultiplied);
     image.fill(Qt::red);
     child->attachBuffer(m_shm->createBuffer(image));
     child->damage(QRect(0, 0, 100, 100));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwayland-5.37.0/autotests/client/test_wayland_surface.cpp 
new/kwayland-5.38.0/autotests/client/test_wayland_surface.cpp
--- old/kwayland-5.37.0/autotests/client/test_wayland_surface.cpp       
2017-08-06 18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/autotests/client/test_wayland_surface.cpp       
2017-09-02 11:39:02.000000000 +0200
@@ -261,7 +261,7 @@
     QVERIFY(damageSpy.isEmpty());
     QVERIFY(!serverSurface->isMapped());
 
-    QImage img(QSize(10, 10), QImage::Format_ARGB32);
+    QImage img(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     auto b = m_shm->createBuffer(img);
     s->attachBuffer(b);
@@ -275,7 +275,7 @@
     // damage multiple times
     QRegion testRegion(5, 8, 3, 6);
     testRegion = testRegion.united(QRect(10, 20, 30, 15));
-    img = QImage(QSize(40, 35), QImage::Format_ARGB32);
+    img = QImage(QSize(40, 35), QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     b = m_shm->createBuffer(img);
     s->attachBuffer(b);
@@ -302,7 +302,7 @@
 
     QSignalSpy frameRenderedSpy(s, SIGNAL(frameRendered()));
     QVERIFY(frameRenderedSpy.isValid());
-    QImage img(QSize(10, 10), QImage::Format_ARGB32);
+    QImage img(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     auto b = m_shm->createBuffer(img);
     s->attachBuffer(b);
@@ -325,10 +325,10 @@
     KWayland::Server::SurfaceInterface *serverSurface = 
serverSurfaceCreated.first().first().value<KWayland::Server::SurfaceInterface*>();
     QVERIFY(serverSurface);
 
-    // create two images
+    // create three images
     QImage black(24, 24, QImage::Format_RGB32);
     black.fill(Qt::black);
-    QImage red(24, 24, QImage::Format_ARGB32);
+    QImage red(24, 24, QImage::Format_ARGB32); //Note - deliberately not 
premultiplied
     red.fill(QColor(255, 0, 0, 128));
     QImage blue(24, 24, QImage::Format_ARGB32_Premultiplied);
     blue.fill(QColor(0, 0, 255, 128));
@@ -371,8 +371,15 @@
     KWayland::Server::BufferInterface *buffer2 = serverSurface->buffer();
     buffer2->ref();
     QVERIFY(buffer2->shmBuffer());
-    QCOMPARE(buffer2->data(), red);
-    QCOMPARE(buffer2->data().format(), QImage::Format_ARGB32);
+    QCOMPARE(buffer2->data().format(), QImage::Format_ARGB32_Premultiplied);
+    QCOMPARE(buffer2->data().width(), 24);
+    QCOMPARE(buffer2->data().height(), 24);
+    for (int i = 0; i < 24; ++i) {
+        for (int j = 0; j < 24; ++j) {
+            // it's premultiplied in the format
+            QCOMPARE(buffer2->data().pixel(i, j), qRgba(128, 0, 0, 128));
+        }
+    }
     buffer2->unref();
     QVERIFY(buffer2->isReferenced());
     QVERIFY(!redBuffer.data()->isReleased());
@@ -400,7 +407,7 @@
     KWayland::Server::BufferInterface *buffer3 = serverSurface->buffer();
     buffer3->ref();
     QVERIFY(buffer3->shmBuffer());
-    QCOMPARE(buffer3->data().format(), QImage::Format_ARGB32);
+    QCOMPARE(buffer3->data().format(), QImage::Format_ARGB32_Premultiplied);
     QCOMPARE(buffer3->data().width(), 24);
     QCOMPARE(buffer3->data().height(), 24);
     for (int i = 0; i < 24; ++i) {
@@ -482,7 +489,7 @@
     // create two images
     QImage black(24, 24, QImage::Format_RGB32);
     black.fill(Qt::black);
-    QImage red(24, 24, QImage::Format_ARGB32);
+    QImage red(24, 24, QImage::Format_ARGB32_Premultiplied);
     red.fill(QColor(255, 0, 0, 128));
 
     auto blackBuffer = pool1.createBuffer(black);
@@ -707,7 +714,7 @@
     scaleChangedSpy.clear();
 
     //attach a buffer of 100x100, our scale is 4, so this should be a size of 
25x25
-    QImage red(100, 100, QImage::Format_ARGB32);
+    QImage red(100, 100, QImage::Format_ARGB32_Premultiplied);
     red.fill(QColor(255, 0, 0, 128));
     auto redBuffer = m_shm->createBuffer(red);
     s->attachBuffer(redBuffer.data());
@@ -731,7 +738,7 @@
     scaleChangedSpy.clear();
 
     //set scale and size in one commit, buffer is 50x50 at scale 2 so size 
should be 25x25
-    QImage blue(50, 50, QImage::Format_ARGB32);
+    QImage blue(50, 50, QImage::Format_ARGB32_Premultiplied);
     red.fill(QColor(255, 0, 0, 128));
     auto blueBuffer = m_shm->createBuffer(blue);
     s->attachBuffer(blueBuffer.data());
@@ -907,7 +914,7 @@
     // let's damage this surface
     QSignalSpy damagedSpy(serverSurface, &SurfaceInterface::damaged);
     QVERIFY(damagedSpy.isValid());
-    QImage image(QSize(100, 100), QImage::Format_ARGB32);
+    QImage image(QSize(100, 100), QImage::Format_ARGB32_Premultiplied);
     image.fill(Qt::red);
     s->attachBuffer(m_shm->createBuffer(image));
     s->damage(QRect(0, 0, 100, 100));
@@ -948,7 +955,7 @@
     QVERIFY(serverSurface);
 
     // now render to it
-    QImage img(QSize(10, 10), QImage::Format_ARGB32);
+    QImage img(QSize(10, 10), QImage::Format_ARGB32_Premultiplied);
     img.fill(Qt::black);
     auto b = m_shm->createBuffer(img);
     s->attachBuffer(b);
@@ -1076,6 +1083,12 @@
     QVERIFY(enteredSpy.wait());
     QCOMPARE(enteredSpy.count(), 2);
     QCOMPARE(leftSpy.count(), 1);
+
+    //delete output client is on.
+    //client should get an exit and be left on no outputs (which is allowed)
+    serverOutput->deleteLater();
+    QVERIFY(leftSpy.wait());
+    QCOMPARE(serverSurface->outputs(), QVector<OutputInterface*>());
 }
 
 QTEST_GUILESS_MAIN(TestWaylandSurface)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/blur.cpp 
new/kwayland-5.38.0/src/client/blur.cpp
--- old/kwayland-5.37.0/src/client/blur.cpp     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/blur.cpp     2017-09-02 11:39:02.000000000 
+0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class BlurManager::Private
+class Q_DECL_HIDDEN BlurManager::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/buffer.h 
new/kwayland-5.38.0/src/client/buffer.h
--- old/kwayland-5.37.0/src/client/buffer.h     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/buffer.h     2017-09-02 11:39:02.000000000 
+0200
@@ -52,6 +52,7 @@
         ARGB32, ///< 32-bit ARGB format, can be used for QImage::Format_ARGB32 
and QImage::Format_ARGB32_Premultiplied
         RGB32 ///< 32-bit RGB format, can be used for QImage::Format_RGB32
     };
+
     ~Buffer();
     /**
      * Copies the data from @p src into the Buffer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/buffer_p.h 
new/kwayland-5.38.0/src/client/buffer_p.h
--- old/kwayland-5.37.0/src/client/buffer_p.h   2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/buffer_p.h   2017-09-02 11:39:02.000000000 
+0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class Buffer::Private
+class Q_DECL_HIDDEN Buffer::Private
 {
 public:
     Private(Buffer *q, ShmPool *parent, wl_buffer *nativeBuffer, const QSize 
&size, int32_t stride, size_t offset, Format format);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/compositor.cpp 
new/kwayland-5.38.0/src/client/compositor.cpp
--- old/kwayland-5.37.0/src/client/compositor.cpp       2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/compositor.cpp       2017-09-02 
11:39:02.000000000 +0200
@@ -34,7 +34,7 @@
 namespace Client
 {
 
-class Compositor::Private
+class Q_DECL_HIDDEN Compositor::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/connection_thread.cpp 
new/kwayland-5.38.0/src/client/connection_thread.cpp
--- old/kwayland-5.37.0/src/client/connection_thread.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/connection_thread.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -38,7 +38,7 @@
 namespace Client
 {
 
-class ConnectionThread::Private
+class Q_DECL_HIDDEN ConnectionThread::Private
 {
 public:
     Private(ConnectionThread *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/contrast.cpp 
new/kwayland-5.38.0/src/client/contrast.cpp
--- old/kwayland-5.37.0/src/client/contrast.cpp 2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/contrast.cpp 2017-09-02 11:39:02.000000000 
+0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class ContrastManager::Private
+class Q_DECL_HIDDEN ContrastManager::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/datadevice.cpp 
new/kwayland-5.38.0/src/client/datadevice.cpp
--- old/kwayland-5.37.0/src/client/datadevice.cpp       2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/datadevice.cpp       2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class DataDevice::Private
+class Q_DECL_HIDDEN DataDevice::Private
 {
 public:
     explicit Private(DataDevice *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/datadevicemanager.cpp 
new/kwayland-5.38.0/src/client/datadevicemanager.cpp
--- old/kwayland-5.37.0/src/client/datadevicemanager.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/datadevicemanager.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -31,7 +31,7 @@
 namespace Client
 {
 
-class DataDeviceManager::Private
+class Q_DECL_HIDDEN DataDeviceManager::Private
 {
 public:
     WaylandPointer<wl_data_device_manager, wl_data_device_manager_destroy> 
manager;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/dataoffer.cpp 
new/kwayland-5.38.0/src/client/dataoffer.cpp
--- old/kwayland-5.37.0/src/client/dataoffer.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/dataoffer.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class DataOffer::Private
+class Q_DECL_HIDDEN DataOffer::Private
 {
 public:
     Private(wl_data_offer *offer, DataOffer *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/datasource.cpp 
new/kwayland-5.38.0/src/client/datasource.cpp
--- old/kwayland-5.37.0/src/client/datasource.cpp       2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/datasource.cpp       2017-09-02 
11:39:02.000000000 +0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class DataSource::Private
+class Q_DECL_HIDDEN DataSource::Private
 {
 public:
     explicit Private(DataSource *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/dpms.cpp 
new/kwayland-5.38.0/src/client/dpms.cpp
--- old/kwayland-5.37.0/src/client/dpms.cpp     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/dpms.cpp     2017-09-02 11:39:02.000000000 
+0200
@@ -30,7 +30,7 @@
 namespace Client
 {
 
-class DpmsManager::Private
+class Q_DECL_HIDDEN DpmsManager::Private
 {
 public:
     WaylandPointer<org_kde_kwin_dpms_manager, 
org_kde_kwin_dpms_manager_destroy> manager;
@@ -104,7 +104,7 @@
 }
 
 
-class Dpms::Private
+class Q_DECL_HIDDEN Dpms::Private
 {
 public:
     explicit Private(const QPointer<Output> &output, Dpms *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/event_queue.cpp 
new/kwayland-5.38.0/src/client/event_queue.cpp
--- old/kwayland-5.37.0/src/client/event_queue.cpp      2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/event_queue.cpp      2017-09-02 
11:39:02.000000000 +0200
@@ -28,7 +28,7 @@
 namespace Client
 {
 
-class EventQueue::Private
+class Q_DECL_HIDDEN EventQueue::Private
 {
 public:
     Private(EventQueue *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/fakeinput.cpp 
new/kwayland-5.38.0/src/client/fakeinput.cpp
--- old/kwayland-5.37.0/src/client/fakeinput.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/fakeinput.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -36,7 +36,7 @@
 namespace Client
 {
 
-class FakeInput::Private
+class Q_DECL_HIDDEN FakeInput::Private
 {
 public:
     WaylandPointer<org_kde_kwin_fake_input, org_kde_kwin_fake_input_destroy> 
manager;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/fullscreen_shell.cpp 
new/kwayland-5.38.0/src/client/fullscreen_shell.cpp
--- old/kwayland-5.37.0/src/client/fullscreen_shell.cpp 2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/fullscreen_shell.cpp 2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class FullscreenShell::Private
+class Q_DECL_HIDDEN FullscreenShell::Private
 {
 public:
     Private(FullscreenShell *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/idle.cpp 
new/kwayland-5.38.0/src/client/idle.cpp
--- old/kwayland-5.37.0/src/client/idle.cpp     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/idle.cpp     2017-09-02 11:39:02.000000000 
+0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class Idle::Private
+class Q_DECL_HIDDEN Idle::Private
 {
 public:
     WaylandPointer<org_kde_kwin_idle, org_kde_kwin_idle_destroy> manager;
@@ -102,7 +102,7 @@
     return d->manager;
 }
 
-class IdleTimeout::Private
+class Q_DECL_HIDDEN IdleTimeout::Private
 {
 public:
     explicit Private(IdleTimeout *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/keyboard.cpp 
new/kwayland-5.38.0/src/client/keyboard.cpp
--- old/kwayland-5.37.0/src/client/keyboard.cpp 2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/keyboard.cpp 2017-09-02 11:39:02.000000000 
+0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class Keyboard::Private
+class Q_DECL_HIDDEN Keyboard::Private
 {
 public:
     Private(Keyboard *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/output.cpp 
new/kwayland-5.38.0/src/client/output.cpp
--- old/kwayland-5.37.0/src/client/output.cpp   2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/output.cpp   2017-09-02 11:39:02.000000000 
+0200
@@ -37,7 +37,7 @@
 typedef QList<Output::Mode> Modes;
 }
 
-class Output::Private
+class Q_DECL_HIDDEN Output::Private
 {
 public:
     Private(Output *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/outputconfiguration.cpp 
new/kwayland-5.38.0/src/client/outputconfiguration.cpp
--- old/kwayland-5.37.0/src/client/outputconfiguration.cpp      2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/outputconfiguration.cpp      2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 {
 
 
-class OutputConfiguration::Private
+class Q_DECL_HIDDEN OutputConfiguration::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/outputdevice.cpp 
new/kwayland-5.38.0/src/client/outputdevice.cpp
--- old/kwayland-5.37.0/src/client/outputdevice.cpp     2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/outputdevice.cpp     2017-09-02 
11:39:02.000000000 +0200
@@ -37,7 +37,7 @@
 
 typedef QList<OutputDevice::Mode> Modes;
 
-class OutputDevice::Private
+class Q_DECL_HIDDEN OutputDevice::Private
 {
 public:
     Private(OutputDevice *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/outputmanagement.cpp 
new/kwayland-5.38.0/src/client/outputmanagement.cpp
--- old/kwayland-5.37.0/src/client/outputmanagement.cpp 2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/outputmanagement.cpp 2017-09-02 
11:39:02.000000000 +0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class OutputManagement::Private
+class Q_DECL_HIDDEN OutputManagement::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/plasmashell.cpp 
new/kwayland-5.38.0/src/client/plasmashell.cpp
--- old/kwayland-5.37.0/src/client/plasmashell.cpp      2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/plasmashell.cpp      2017-09-02 
11:39:02.000000000 +0200
@@ -30,14 +30,14 @@
 namespace Client
 {
 
-class PlasmaShell::Private
+class Q_DECL_HIDDEN PlasmaShell::Private
 {
 public:
     WaylandPointer<org_kde_plasma_shell, org_kde_plasma_shell_destroy> shell;
     EventQueue *queue = nullptr;
 };
 
-class PlasmaShellSurface::Private
+class Q_DECL_HIDDEN PlasmaShellSurface::Private
 {
 public:
     Private(PlasmaShellSurface *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwayland-5.37.0/src/client/plasmawindowmanagement.cpp 
new/kwayland-5.38.0/src/client/plasmawindowmanagement.cpp
--- old/kwayland-5.37.0/src/client/plasmawindowmanagement.cpp   2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/plasmawindowmanagement.cpp   2017-09-02 
11:39:02.000000000 +0200
@@ -38,7 +38,7 @@
 namespace Client
 {
 
-class PlasmaWindowManagement::Private
+class Q_DECL_HIDDEN PlasmaWindowManagement::Private
 {
 public:
     Private(PlasmaWindowManagement *q);
@@ -60,7 +60,7 @@
     PlasmaWindowManagement *q;
 };
 
-class PlasmaWindow::Private
+class Q_DECL_HIDDEN PlasmaWindow::Private
 {
 public:
     Private(org_kde_plasma_window *window, quint32 internalId, PlasmaWindow 
*q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/plasmawindowmodel.cpp 
new/kwayland-5.38.0/src/client/plasmawindowmodel.cpp
--- old/kwayland-5.37.0/src/client/plasmawindowmodel.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/plasmawindowmodel.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -27,7 +27,7 @@
 namespace Client
 {
 
-class PlasmaWindowModel::Private
+class Q_DECL_HIDDEN PlasmaWindowModel::Private
 {
 public:
     Private(PlasmaWindowModel *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/pointer.cpp 
new/kwayland-5.38.0/src/client/pointer.cpp
--- old/kwayland-5.37.0/src/client/pointer.cpp  2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/pointer.cpp  2017-09-02 11:39:02.000000000 
+0200
@@ -31,7 +31,7 @@
 namespace Client
 {
 
-class Pointer::Private
+class Q_DECL_HIDDEN Pointer::Private
 {
 public:
     Private(Pointer *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/pointerconstraints.cpp 
new/kwayland-5.38.0/src/client/pointerconstraints.cpp
--- old/kwayland-5.37.0/src/client/pointerconstraints.cpp       2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/pointerconstraints.cpp       2017-09-02 
11:39:02.000000000 +0200
@@ -31,7 +31,7 @@
 namespace Client
 {
 
-class PointerConstraints::Private
+class Q_DECL_HIDDEN PointerConstraints::Private
 {
 public:
     Private() = default;
@@ -154,7 +154,7 @@
     return p;
 }
 
-class LockedPointer::Private
+class Q_DECL_HIDDEN LockedPointer::Private
 {
 public:
     Private(LockedPointer *q);
@@ -260,7 +260,7 @@
     zwp_locked_pointer_v1_set_region(d->lockedpointer, wr);
 }
 
-class ConfinedPointer::Private
+class Q_DECL_HIDDEN ConfinedPointer::Private
 {
 public:
     Private(ConfinedPointer *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/pointergestures.cpp 
new/kwayland-5.38.0/src/client/pointergestures.cpp
--- old/kwayland-5.37.0/src/client/pointergestures.cpp  2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/pointergestures.cpp  2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class PointerGestures::Private
+class Q_DECL_HIDDEN PointerGestures::Private
 {
 public:
     Private() = default;
@@ -116,7 +116,7 @@
     return p;
 }
 
-class PointerSwipeGesture::Private
+class Q_DECL_HIDDEN PointerSwipeGesture::Private
 {
 public:
     Private(PointerSwipeGesture *q);
@@ -233,7 +233,7 @@
     return d->pointerswipegesture.isValid();
 }
 
-class PointerPinchGesture::Private
+class Q_DECL_HIDDEN PointerPinchGesture::Private
 {
 public:
     Private(PointerPinchGesture *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/region.cpp 
new/kwayland-5.38.0/src/client/region.cpp
--- old/kwayland-5.37.0/src/client/region.cpp   2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/region.cpp   2017-09-02 11:39:02.000000000 
+0200
@@ -30,7 +30,7 @@
 namespace Client
 {
 
-class Region::Private
+class Q_DECL_HIDDEN Region::Private
 {
 public:
     Private(const QRegion &region);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/registry.cpp 
new/kwayland-5.38.0/src/client/registry.cpp
--- old/kwayland-5.37.0/src/client/registry.cpp 2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/registry.cpp 2017-09-02 11:39:02.000000000 
+0200
@@ -294,7 +294,7 @@
 }
 }
 
-class Registry::Private
+class Q_DECL_HIDDEN Registry::Private
 {
 public:
     Private(Registry *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/relativepointer.cpp 
new/kwayland-5.38.0/src/client/relativepointer.cpp
--- old/kwayland-5.37.0/src/client/relativepointer.cpp  2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/relativepointer.cpp  2017-09-02 
11:39:02.000000000 +0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class RelativePointerManager::Private
+class Q_DECL_HIDDEN RelativePointerManager::Private
 {
 public:
     Private() = default;
@@ -101,7 +101,7 @@
     return p;
 }
 
-class RelativePointer::Private
+class Q_DECL_HIDDEN RelativePointer::Private
 {
 public:
     Private(RelativePointer *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/seat.cpp 
new/kwayland-5.38.0/src/client/seat.cpp
--- old/kwayland-5.37.0/src/client/seat.cpp     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/seat.cpp     2017-09-02 11:39:02.000000000 
+0200
@@ -31,7 +31,7 @@
 namespace Client
 {
 
-class Seat::Private
+class Q_DECL_HIDDEN Seat::Private
 {
 public:
     Private(Seat *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/server_decoration.cpp 
new/kwayland-5.38.0/src/client/server_decoration.cpp
--- old/kwayland-5.37.0/src/client/server_decoration.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/server_decoration.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class ServerSideDecorationManager::Private
+class Q_DECL_HIDDEN ServerSideDecorationManager::Private
 {
 public:
     Private() = default;
@@ -49,7 +49,7 @@
     static const struct org_kde_kwin_server_decoration_manager_listener 
s_listener;
 };
 
-class ServerSideDecoration::Private
+class Q_DECL_HIDDEN ServerSideDecoration::Private
 {
 public:
     Private(ServerSideDecoration *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/shadow.cpp 
new/kwayland-5.38.0/src/client/shadow.cpp
--- old/kwayland-5.37.0/src/client/shadow.cpp   2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/shadow.cpp   2017-09-02 11:39:02.000000000 
+0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class ShadowManager::Private
+class Q_DECL_HIDDEN ShadowManager::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/shell.cpp 
new/kwayland-5.38.0/src/client/shell.cpp
--- old/kwayland-5.37.0/src/client/shell.cpp    2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/shell.cpp    2017-09-02 11:39:02.000000000 
+0200
@@ -36,7 +36,7 @@
 namespace Client
 {
 
-class Shell::Private
+class Q_DECL_HIDDEN Shell::Private
 {
 public:
     WaylandPointer<wl_shell, wl_shell_destroy> shell;
@@ -124,7 +124,7 @@
     return d->shell;
 }
 
-class ShellSurface::Private
+class Q_DECL_HIDDEN ShellSurface::Private
 {
 public:
     Private(ShellSurface *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/shm_pool.cpp 
new/kwayland-5.38.0/src/client/shm_pool.cpp
--- old/kwayland-5.37.0/src/client/shm_pool.cpp 2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/shm_pool.cpp 2017-09-02 11:39:02.000000000 
+0200
@@ -38,7 +38,7 @@
 namespace Client
 {
 
-class ShmPool::Private
+class Q_DECL_HIDDEN ShmPool::Private
 {
 public:
     Private(ShmPool *q);
@@ -170,13 +170,15 @@
 static Buffer::Format toBufferFormat(const QImage &image)
 {
     switch (image.format()) {
-    case QImage::Format_ARGB32:
     case QImage::Format_ARGB32_Premultiplied:
         return Buffer::Format::ARGB32;
     case QImage::Format_RGB32:
         return Buffer::Format::RGB32;
+    case QImage::Format_ARGB32:
+        qCWarning(KWAYLAND_CLIENT) << "Unsupported image format: " << 
image.format() << ". expect slow performance. Use 
QImage::Format_ARGB32_Premultiplied";
+        return Buffer::Format::ARGB32;
     default:
-        qCWarning(KWAYLAND_CLIENT) << "Unsupported image format: " << 
image.format() << "going to use ARGB32, expect rendering errors";
+        qCWarning(KWAYLAND_CLIENT) << "Unsupported image format: " << 
image.format() << ". expect slow performance.";
         return Buffer::Format::ARGB32;
     }
 }
@@ -187,11 +189,17 @@
     if (image.isNull() || !d->valid) {
         return QWeakPointer<Buffer>();
     }
-    auto it = d->getBuffer(image.size(), image.bytesPerLine(), 
toBufferFormat(image));
+    auto format = toBufferFormat(image);
+    auto it = d->getBuffer(image.size(), image.bytesPerLine(), format);
     if (it == d->buffers.end()) {
         return QWeakPointer<Buffer>();
     }
-    (*it)->copy(image.bits());
+    if (format == Buffer::Format::ARGB32 && image.format() != 
QImage::Format_ARGB32_Premultiplied) {
+        auto imageCopy = 
image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
+        (*it)->copy(imageCopy.bits());
+    } else {
+        (*it)->copy(image.bits());
+    }
     return QWeakPointer<Buffer>(*it);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/slide.cpp 
new/kwayland-5.38.0/src/client/slide.cpp
--- old/kwayland-5.37.0/src/client/slide.cpp    2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/slide.cpp    2017-09-02 11:39:02.000000000 
+0200
@@ -29,7 +29,7 @@
 namespace Client
 {
 
-class SlideManager::Private
+class Q_DECL_HIDDEN SlideManager::Private
 {
 public:
     Private() = default;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/subcompositor.cpp 
new/kwayland-5.38.0/src/client/subcompositor.cpp
--- old/kwayland-5.37.0/src/client/subcompositor.cpp    2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/subcompositor.cpp    2017-09-02 
11:39:02.000000000 +0200
@@ -30,7 +30,7 @@
 namespace Client
 {
 
-class SubCompositor::Private
+class Q_DECL_HIDDEN SubCompositor::Private
 {
 public:
     WaylandPointer<wl_subcompositor, wl_subcompositor_destroy> subCompositor;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/subsurface.cpp 
new/kwayland-5.38.0/src/client/subsurface.cpp
--- old/kwayland-5.37.0/src/client/subsurface.cpp       2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/subsurface.cpp       2017-09-02 
11:39:02.000000000 +0200
@@ -28,7 +28,7 @@
 namespace Client
 {
 
-class SubSurface::Private
+class Q_DECL_HIDDEN SubSurface::Private
 {
 public:
     Private(QPointer<Surface> surface, QPointer<Surface> parentSurface, 
SubSurface *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/surface.cpp 
new/kwayland-5.38.0/src/client/surface.cpp
--- old/kwayland-5.37.0/src/client/surface.cpp  2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/surface.cpp  2017-09-02 11:39:02.000000000 
+0200
@@ -36,7 +36,7 @@
 namespace Client
 {
 
-class Surface::Private
+class Q_DECL_HIDDEN Surface::Private
 {
 public:
     Private(Surface *q);
@@ -184,6 +184,13 @@
         return;
     }
     s->outputs << o;
+    QObject::connect(o, &Output::removed, s->q, [s, o]() {
+        if (!s->outputs.contains(o)) {
+            return;
+        }
+        s->outputs.removeOne(o);
+        s->q->outputLeft(o);
+    });
     emit s->q->outputEntered(o);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/textinput_p.h 
new/kwayland-5.38.0/src/client/textinput_p.h
--- old/kwayland-5.37.0/src/client/textinput_p.h        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/client/textinput_p.h        2017-09-02 
11:39:02.000000000 +0200
@@ -73,7 +73,7 @@
     QScopedPointer<Private> d;
 };
 
-class TextInputManager::Private
+class Q_DECL_HIDDEN TextInputManager::Private
 {
 public:
     Private() = default;
@@ -105,7 +105,7 @@
     EventQueue *queue = nullptr;
 };
 
-class TextInput::Private
+class Q_DECL_HIDDEN TextInput::Private
 {
 public:
     Private(Seat *seat);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/touch.cpp 
new/kwayland-5.38.0/src/client/touch.cpp
--- old/kwayland-5.37.0/src/client/touch.cpp    2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/touch.cpp    2017-09-02 11:39:02.000000000 
+0200
@@ -32,7 +32,7 @@
 namespace Client
 {
 
-class Touch::Private
+class Q_DECL_HIDDEN Touch::Private
 {
 public:
     Private(Touch *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/client/xdgshell_p.h 
new/kwayland-5.38.0/src/client/xdgshell_p.h
--- old/kwayland-5.37.0/src/client/xdgshell_p.h 2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/client/xdgshell_p.h 2017-09-02 11:39:02.000000000 
+0200
@@ -28,7 +28,7 @@
 namespace Client
 {
 
-class XdgShell::Private
+class Q_DECL_HIDDEN XdgShell::Private
 {
 public:
     virtual ~Private();
@@ -64,7 +64,7 @@
     class Private;
 };
 
-class XdgShellSurface::Private
+class Q_DECL_HIDDEN XdgShellSurface::Private
 {
 public:
     virtual ~Private();
@@ -115,7 +115,7 @@
     class Private;
 };
 
-class XdgShellPopup::Private
+class Q_DECL_HIDDEN XdgShellPopup::Private
 {
 public:
     Private(XdgShellPopup *q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/buffer_interface.cpp 
new/kwayland-5.38.0/src/server/buffer_interface.cpp
--- old/kwayland-5.37.0/src/server/buffer_interface.cpp 2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/server/buffer_interface.cpp 2017-09-02 
11:39:02.000000000 +0200
@@ -224,7 +224,7 @@
     }
     switch (wl_shm_buffer_get_format(shmBuffer)) {
     case WL_SHM_FORMAT_ARGB8888:
-        return QImage::Format_ARGB32;
+        return QImage::Format_ARGB32_Premultiplied;
     case WL_SHM_FORMAT_XRGB8888:
         return QImage::Format_RGB32;
     default:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/datadevice_interface.cpp 
new/kwayland-5.38.0/src/server/datadevice_interface.cpp
--- old/kwayland-5.37.0/src/server/datadevice_interface.cpp     2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/server/datadevice_interface.cpp     2017-09-02 
11:39:02.000000000 +0200
@@ -201,7 +201,12 @@
 void DataDeviceInterface::sendSelection(DataDeviceInterface *other)
 {
     Q_D();
-    auto r = d->createDataOffer(other->selection());
+    auto otherSelection = other->selection();
+    if (!otherSelection) {
+        sendClearSelection();
+        return;
+    }
+    auto r = d->createDataOffer(otherSelection);
     if (!r) {
         return;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/global.cpp 
new/kwayland-5.38.0/src/server/global.cpp
--- old/kwayland-5.37.0/src/server/global.cpp   2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/server/global.cpp   2017-09-02 11:39:02.000000000 
+0200
@@ -70,6 +70,7 @@
     if (!d->global) {
         return;
     }
+    emit aboutToDestroyGlobal();
     wl_global_destroy(d->global);
     d->global = nullptr;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/global.h 
new/kwayland-5.38.0/src/server/global.h
--- old/kwayland-5.37.0/src/server/global.h     2017-08-06 18:55:14.000000000 
+0200
+++ new/kwayland-5.38.0/src/server/global.h     2017-09-02 11:39:02.000000000 
+0200
@@ -90,6 +90,14 @@
      **/
     operator wl_global*() const;
 
+Q_SIGNALS:
+    /**
+     * This signal is emitted when the client is in the process of removing 
the wl_global.
+     * At the time the signal is emitted the global is still valid and allows 
to perform
+     * cleanup tasks.
+     */
+    void aboutToDestroyGlobal();
+
 protected:
     class Private;
     explicit Global(Private *d, QObject *parent = nullptr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/surface_interface.cpp 
new/kwayland-5.38.0/src/server/surface_interface.cpp
--- old/kwayland-5.37.0/src/server/surface_interface.cpp        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/server/surface_interface.cpp        2017-09-02 
11:39:02.000000000 +0200
@@ -793,19 +793,25 @@
         for (wl_resource *r : resources) {
             wl_surface_send_leave(d->resource, r);
         }
+        disconnect(d->outputDestroyedConnections.take(*it));
     }
-    // TODO: send leave when OutputInterface gets destroyed
-
     QVector<OutputInterface *> addedOutputsOutputs = outputs;
     for (auto it = d->outputs.constBegin(), end = d->outputs.constEnd(); it != 
end; ++it) {
         const auto o = *it;
         addedOutputsOutputs.removeOne(o);
     }
     for (auto it = addedOutputsOutputs.constBegin(), end = 
addedOutputsOutputs.constEnd(); it != end; ++it) {
-        const auto resources = (*it)->clientResources(client());
+        const auto o = *it;
+        const auto resources = o->clientResources(client());
         for (wl_resource *r : resources) {
             wl_surface_send_enter(d->resource, r);
         }
+        d->outputDestroyedConnections[o] = connect(o, 
&Global::aboutToDestroyGlobal, this, [this, o] {
+            Q_D();
+            auto outputs = d->outputs;
+            if (outputs.removeOne(o)) {
+                setOutputs(outputs);
+            }});
     }
     // TODO: send enter when the client binds the OutputInterface another time
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.37.0/src/server/surface_interface_p.h 
new/kwayland-5.38.0/src/server/surface_interface_p.h
--- old/kwayland-5.37.0/src/server/surface_interface_p.h        2017-08-06 
18:55:14.000000000 +0200
+++ new/kwayland-5.38.0/src/server/surface_interface_p.h        2017-09-02 
11:39:02.000000000 +0200
@@ -97,6 +97,7 @@
 
     QPointer<LockedPointerInterface> lockedPointer;
     QPointer<ConfinedPointerInterface> confinedPointer;
+    QHash<OutputInterface*, QMetaObject::Connection> 
outputDestroyedConnections;
 
 private:
     QMetaObject::Connection constrainsOneShotConnection;


Reply via email to