Hello community,

here is the log from the commit of package kwayland for openSUSE:Factory 
checked in at 2017-04-30 21:21:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwayland (Old)
 and      /work/SRC/openSUSE:Factory/.kwayland.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kwayland"

Sun Apr 30 21:21:29 2017 rev:35 rq:492092 version:5.33.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kwayland/kwayland.changes        2017-03-28 
15:12:47.105767475 +0200
+++ /work/SRC/openSUSE:Factory/.kwayland.new/kwayland.changes   2017-04-30 
21:21:30.704886169 +0200
@@ -1,0 +2,18 @@
+Sat Apr 15 10:11:57 CEST 2017 - [email protected]
+
+- Update to 5.33.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.33.0.php
+- Changes since 5.32.0:
+  * Upgrade ECM and KF5 version requirements for 5.33.0 release.
+  * Add support for wl_shell_surface::set_popup and popup_done
+  * Upgrade KF5 version to 5.33.0.
+
+-------------------------------------------------------------------
+Fri Apr  7 07:26:47 UTC 2017 - [email protected]
+
+- Drop fix-wayland-1.3-dependency.diff which isn't needed anymore
+  since SLE12 SP2.
+
+-------------------------------------------------------------------

Old:
----
  fix-wayland-1.3-dependency.diff
  kwayland-5.32.0.tar.xz

New:
----
  kwayland-5.33.0.tar.xz

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

Other differences:
------------------
++++++ kwayland.spec ++++++
--- /var/tmp/diff_new_pack.XrAr9C/_old  2017-04-30 21:21:31.552766620 +0200
+++ /var/tmp/diff_new_pack.XrAr9C/_new  2017-04-30 21:21:31.556766055 +0200
@@ -16,9 +16,9 @@
 #
 
 
-%define _tar_path 5.32
+%define _tar_path 5.33
 Name:           kwayland
-Version:        5.32.0
+Version:        5.33.0
 Release:        0
 Summary:        KDE Wayland library
 License:        LGPL-2.1+
@@ -26,8 +26,6 @@
 Url:            http://www.kde.org
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
-# PATCH-FIX-OPENSUSE fix-wayland-1.3-dependency.diff [email protected] -- 
Changes the wayland version kwayland depends on
-Patch0:         fix-wayland-1.3-dependency.diff
 BuildRequires:  cmake >= 3.0
 BuildRequires:  extra-cmake-modules >= %{_tar_path}
 BuildRequires:  fdupes
@@ -67,9 +65,6 @@
 
 %prep
 %setup -q
-%if 0%{?suse_version} == 1315 && ! 0%{?is_opensuse}
-%patch0 -p1
-%endif
 
 %build
   %cmake_kf5 -d build

++++++ kwayland-5.32.0.tar.xz -> kwayland-5.33.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.32.0/CMakeLists.txt 
new/kwayland-5.33.0/CMakeLists.txt
--- old/kwayland-5.32.0/CMakeLists.txt  2017-03-03 14:09:38.000000000 +0100
+++ new/kwayland-5.33.0/CMakeLists.txt  2017-04-01 20:44:12.000000000 +0200
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.32.0") # handled by release scripts
+set(KF5_VERSION "5.33.0") # handled by release scripts
 project(KWayland VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.32.0  NO_MODULE)
+find_package(ECM 5.33.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.32.0/autotests/client/test_wayland_shell.cpp 
new/kwayland-5.33.0/autotests/client/test_wayland_shell.cpp
--- old/kwayland-5.32.0/autotests/client/test_wayland_shell.cpp 2017-03-03 
14:09:38.000000000 +0100
+++ new/kwayland-5.33.0/autotests/client/test_wayland_shell.cpp 2017-04-01 
20:44:12.000000000 +0200
@@ -55,6 +55,7 @@
     void testToplevel();
     void testTransient_data();
     void testTransient();
+    void testTransientPopup();
     void testPing();
     void testTitle();
     void testWindowClass();
@@ -475,6 +476,72 @@
     QVERIFY(serverSurface2->acceptsKeyboardFocus());
 }
 
+void TestWaylandShell::testTransientPopup()
+{
+    using namespace KWayland::Server;
+    using namespace KWayland::Client;
+    QScopedPointer<Surface> s(m_compositor->createSurface());
+    QVERIFY(!s.isNull());
+    QVERIFY(s->isValid());
+    ShellSurface *surface = m_shell->createSurface(s.data(), m_shell);
+
+    QSignalSpy serverSurfaceSpy(m_shellInterface, 
&ShellInterface::surfaceCreated);
+    QVERIFY(serverSurfaceSpy.isValid());
+    QVERIFY(serverSurfaceSpy.wait());
+    ShellSurfaceInterface *serverSurface = 
serverSurfaceSpy.first().first().value<ShellSurfaceInterface*>();
+    QVERIFY(serverSurface);
+    QCOMPARE(serverSurface->isToplevel(), true);
+    QCOMPARE(serverSurface->isPopup(), false);
+    QCOMPARE(serverSurface->isTransient(), false);
+    QCOMPARE(serverSurface->transientFor(), QPointer<SurfaceInterface>());
+    QCOMPARE(serverSurface->transientOffset(), QPoint());
+    QVERIFY(serverSurface->acceptsKeyboardFocus());
+
+    QSignalSpy transientSpy(serverSurface, 
&ShellSurfaceInterface::transientChanged);
+    QVERIFY(transientSpy.isValid());
+    QSignalSpy transientOffsetSpy(serverSurface, 
&ShellSurfaceInterface::transientOffsetChanged);
+    QVERIFY(transientOffsetSpy.isValid());
+    QSignalSpy transientForChangedSpy(serverSurface, 
&ShellSurfaceInterface::transientForChanged);
+    QVERIFY(transientForChangedSpy.isValid());
+
+    QScopedPointer<Surface> s2(m_compositor->createSurface());
+    m_shell->createSurface(s2.data(), m_shell);
+    serverSurfaceSpy.clear();
+    QVERIFY(serverSurfaceSpy.wait());
+    ShellSurfaceInterface *serverSurface2 = 
serverSurfaceSpy.first().first().value<ShellSurfaceInterface*>();
+    QVERIFY(serverSurface2 != serverSurface);
+    QVERIFY(serverSurface2);
+    QVERIFY(serverSurface2->acceptsKeyboardFocus());
+
+    // TODO: proper serial checking
+    surface->setTransientPopup(s2.data(), m_seat, 1, QPoint(10, 20));
+    QVERIFY(transientSpy.wait());
+    QCOMPARE(transientSpy.count(), 1);
+    QCOMPARE(transientSpy.first().first().toBool(), true);
+    QCOMPARE(transientOffsetSpy.count(), 1);
+    QCOMPARE(transientOffsetSpy.first().first().toPoint(), QPoint(10, 20));
+    QCOMPARE(transientForChangedSpy.count(), 1);
+    QCOMPARE(serverSurface->isToplevel(), false);
+    QCOMPARE(serverSurface->isPopup(), true);
+    QCOMPARE(serverSurface->isTransient(), true);
+    QCOMPARE(serverSurface->transientFor(), 
QPointer<SurfaceInterface>(serverSurface2->surface()));
+    QCOMPARE(serverSurface->transientOffset(), QPoint(10, 20));
+    // TODO: honor the flag
+    QCOMPARE(serverSurface->acceptsKeyboardFocus(), false);
+
+    QCOMPARE(serverSurface2->isToplevel(), true);
+    QCOMPARE(serverSurface2->isPopup(), false);
+    QCOMPARE(serverSurface2->isTransient(), false);
+    QCOMPARE(serverSurface2->transientFor(), QPointer<SurfaceInterface>());
+    QCOMPARE(serverSurface2->transientOffset(), QPoint());
+
+    // send popup done
+    QSignalSpy popupDoneSpy(surface, &ShellSurface::popupDone);
+    QVERIFY(popupDoneSpy.isValid());
+    serverSurface->popupDone();
+    QVERIFY(popupDoneSpy.wait());
+}
+
 void TestWaylandShell::testPing()
 {
     using namespace KWayland::Server;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.32.0/src/client/shell.cpp 
new/kwayland-5.33.0/src/client/shell.cpp
--- old/kwayland-5.32.0/src/client/shell.cpp    2017-03-03 14:09:38.000000000 
+0100
+++ new/kwayland-5.33.0/src/client/shell.cpp    2017-04-01 20:44:12.000000000 
+0200
@@ -262,9 +262,9 @@
 
 void ShellSurface::Private::popupDoneCallback(void *data, wl_shell_surface 
*shellSurface)
 {
-    // not needed, we don't have popups
-    Q_UNUSED(data)
-    Q_UNUSED(shellSurface)
+    auto s = reinterpret_cast<ShellSurface::Private*>(data);
+    Q_ASSERT(s->surface == shellSurface);
+    emit s->q->popupDone();
 }
 
 void ShellSurface::setup(wl_shell_surface *surface)
@@ -315,6 +315,18 @@
     wl_shell_surface_set_transient(d->surface, *parent, offset.x(), 
offset.y(), wlFlags);
 }
 
+void ShellSurface::setTransientPopup(Surface *parent, Seat *grabbedSeat, 
quint32 grabSerial, const QPoint &offset, TransientFlags flags)
+{
+    Q_ASSERT(isValid());
+    Q_ASSERT(parent);
+    Q_ASSERT(grabbedSeat);
+    uint32_t wlFlags = 0;
+    if (flags.testFlag(TransientFlag::NoFocus)) {
+        wlFlags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE;
+    }
+    wl_shell_surface_set_popup(d->surface, *grabbedSeat, grabSerial, *parent, 
offset.x(), offset.y(), wlFlags);
+}
+
 void ShellSurface::requestMove(Seat *seat, quint32 serial)
 {
     Q_ASSERT(isValid());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.32.0/src/client/shell.h 
new/kwayland-5.33.0/src/client/shell.h
--- old/kwayland-5.32.0/src/client/shell.h      2017-03-03 14:09:38.000000000 
+0100
+++ new/kwayland-5.33.0/src/client/shell.h      2017-04-01 20:44:12.000000000 
+0200
@@ -247,6 +247,26 @@
      **/
     void setTransient(Surface *parent, const QPoint &offset = QPoint(), 
TransientFlags flags = TransientFlag::Default);
 
+    /**
+     * Sets this Surface as a popup transient for @p parent.
+     *
+     * A popup is a transient with an added pointer grab on the @p grabbedSeat.
+     *
+     * The popup grab can be created if the client has an implicit grab (e.g. 
button press)
+     * on the @p grabbedSeat. It needs to pass the @p grabSerial indicating 
the implicit grab
+     * to the request for setting the surface. The implicit grab is turned 
into a popup grab
+     * which will persist after the implicit grab ends. The popup grab ends 
when the ShellSurface
+     * gets destroyed or when the compositor breaks the grab through the 
@link{popupDone} signal.
+     *
+     * @param parent The parent Surface of this ShellSurface
+     * @param grabbedSeat The Seat on which an implicit grab exists
+     * @param grabSerial The serial of the implicit grab
+     * @param offset The offset of this Surface in the parent coordinate system
+     * @param flags The flags for the transient
+     * @since 5.33
+     **/
+    void setTransientPopup(Surface *parent, Seat *grabbedSeat, quint32 
grabSerial, const QPoint &offset = QPoint(), TransientFlags flags = 
TransientFlag::Default);
+
     bool isValid() const;
 
     /**
@@ -308,6 +328,15 @@
     void pinged();
     void sizeChanged(const QSize &);
 
+    /**
+     * The popupDone signal is sent out when a popup grab is broken, that is,
+     * when the user clicks a surface that doesn't belong to the client owning
+     * the popup surface.
+     * @see setTransientPopup
+     * @since 5.33
+     **/
+    void popupDone();
+
 private:
     class Private;
     QScopedPointer<Private> d;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.32.0/src/server/shell_interface.cpp 
new/kwayland-5.33.0/src/server/shell_interface.cpp
--- old/kwayland-5.32.0/src/server/shell_interface.cpp  2017-03-03 
14:09:38.000000000 +0100
+++ new/kwayland-5.33.0/src/server/shell_interface.cpp  2017-04-01 
20:44:12.000000000 +0200
@@ -379,6 +379,9 @@
     emit s->q_func()->transientChanged(!s->transientFor.isNull());
     emit s->q_func()->transientOffsetChanged(s->transientOffset);
     emit s->q_func()->transientForChanged();
+    // we ignore the flags as Qt requests keyboard focus for popups
+    // if we would honor the flag this could break compositors
+    // compare QtWayland (5.6), file qwaylandwlshellsurface.cpp:208
     s->setAcceptsFocus(WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
 }
 
@@ -449,6 +452,14 @@
     return d->acceptsKeyboardFocus;
 }
 
+void ShellSurfaceInterface::popupDone()
+{
+    Q_D();
+    if (isPopup() && d->resource) {
+        wl_shell_surface_send_popup_done(d->resource);
+    }
+}
+
 QPointer< SurfaceInterface > ShellSurfaceInterface::transientFor() const
 {
     Q_D();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwayland-5.32.0/src/server/shell_interface.h 
new/kwayland-5.33.0/src/server/shell_interface.h
--- old/kwayland-5.32.0/src/server/shell_interface.h    2017-03-03 
14:09:38.000000000 +0100
+++ new/kwayland-5.33.0/src/server/shell_interface.h    2017-04-01 
20:44:12.000000000 +0200
@@ -231,6 +231,18 @@
      **/
     bool acceptsKeyboardFocus() const;
 
+    /**
+     * Sends a popup done event to the shell surface.
+     * This is only relevant for popup windows. It indicates that the popup 
grab
+     * got canceled. This happens when e.g. the user clicks outside of any 
surface
+     * of the same client as this ShellSurfaceInterface. It is the task of the
+     * compositor to send the popupDone event appropriately.
+     *
+     * @see isPopup
+     * @since 5.33
+     **/
+    void popupDone();
+
 Q_SIGNALS:
     /**
      * Emitted whenever the title changes.


Reply via email to