Hello community, here is the log from the commit of package kwayland-integration for openSUSE:Factory checked in at 2020-06-08 23:53:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kwayland-integration (Old) and /work/SRC/openSUSE:Factory/.kwayland-integration.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kwayland-integration" Mon Jun 8 23:53:45 2020 rev:84 rq:812316 version:5.19.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kwayland-integration/kwayland-integration.changes 2020-05-07 15:09:59.384311177 +0200 +++ /work/SRC/openSUSE:Factory/.kwayland-integration.new.3606/kwayland-integration.changes 2020-06-08 23:54:52.731372034 +0200 @@ -1,0 +2,20 @@ +Thu Jun 4 13:27:12 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to 5.19.0 + * New bugfix release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.19.0.php +- No code changes since 5.18.90 + +------------------------------------------------------------------- +Thu May 14 14:33:04 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to 5.18.90 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.18.90.php +- Changes since 5.18.5: + * bump to require Qt 5.14 + * [windowsystem] Provide a KWindowShadow implementation + +------------------------------------------------------------------- Old: ---- kwayland-integration-5.18.5.tar.xz kwayland-integration-5.18.5.tar.xz.sig New: ---- kwayland-integration-5.19.0.tar.xz kwayland-integration-5.19.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kwayland-integration.spec ++++++ --- /var/tmp/diff_new_pack.doInBF/_old 2020-06-08 23:54:53.587374675 +0200 +++ /var/tmp/diff_new_pack.doInBF/_new 2020-06-08 23:54:53.591374687 +0200 @@ -18,7 +18,7 @@ %bcond_without lang Name: kwayland-integration -Version: 5.18.5 +Version: 5.19.0 Release: 0 # Full Plasma 5 version (e.g. 5.8.95) %{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}} @@ -28,9 +28,9 @@ License: LGPL-2.1-or-later Group: Development/Libraries/KDE URL: http://www.kde.org -Source: https://download.kde.org/stable/plasma/%{version}/kwayland-integration-%{version}.tar.xz +Source: kwayland-integration-%{version}.tar.xz %if %{with lang} -Source1: https://download.kde.org/stable/plasma/%{version}/kwayland-integration-%{version}.tar.xz.sig +Source1: kwayland-integration-%{version}.tar.xz.sig Source2: plasma.keyring %endif BuildRequires: cmake >= 2.8.12 ++++++ kwayland-integration-5.18.5.tar.xz -> kwayland-integration-5.19.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/.gitignore new/kwayland-integration-5.19.0/.gitignore --- old/kwayland-integration-5.18.5/.gitignore 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/.gitignore 2020-06-04 13:16:18.000000000 +0200 @@ -19,3 +19,5 @@ /build*/ CMakeLists.txt.user* *.unc-backup* +.clang-format +/build*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/CMakeLists.txt new/kwayland-integration-5.19.0/CMakeLists.txt --- old/kwayland-integration-5.18.5/CMakeLists.txt 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/CMakeLists.txt 2020-06-04 13:16:18.000000000 +0200 @@ -1,9 +1,9 @@ project(kwayland-integration) -set(PROJECT_VERSION "5.18.5") +set(PROJECT_VERSION "5.19.0") set(PROJECT_VERSION_MAJOR 5) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) -set(QT_MIN_VERSION "5.12.0") +set(QT_MIN_VERSION "5.14.0") set(KF5_MIN_VERSION "5.64.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/CMakeLists.txt new/kwayland-integration-5.19.0/src/windowsystem/CMakeLists.txt --- old/kwayland-integration-5.18.5/src/windowsystem/CMakeLists.txt 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/src/windowsystem/CMakeLists.txt 2020-06-04 13:16:18.000000000 +0200 @@ -3,8 +3,9 @@ plugin.cpp waylandintegration.cpp windoweffects.cpp - windowsystem.cpp windowinfo.cpp + windowshadow.cpp + windowsystem.cpp ) ecm_qt_declare_logging_category(wayland_plugin_SRCS HEADER logging.h IDENTIFIER KWAYLAND_KWS CATEGORY_NAME org.kde.kf5.kwindowsystem.kwayland DEFAULT_SEVERITY Warning) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/plugin.cpp new/kwayland-integration-5.19.0/src/windowsystem/plugin.cpp --- old/kwayland-integration-5.18.5/src/windowsystem/plugin.cpp 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/src/windowsystem/plugin.cpp 2020-06-04 13:16:18.000000000 +0200 @@ -18,6 +18,7 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include "plugin.h" +#include "windowshadow.h" #include "windowsystem.h" #include "windoweffects.h" #include "windowinfo.h" @@ -45,3 +46,13 @@ { return new WindowInfo(window, properties, properties2); } + +KWindowShadowTilePrivate *KWaylandPlugin::createWindowShadowTile() +{ + return new WindowShadowTile(); +} + +KWindowShadowPrivate *KWaylandPlugin::createWindowShadow() +{ + return new WindowShadow(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/plugin.h new/kwayland-integration-5.19.0/src/windowsystem/plugin.h --- old/kwayland-integration-5.18.5/src/windowsystem/plugin.h 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/src/windowsystem/plugin.h 2020-06-04 13:16:18.000000000 +0200 @@ -35,6 +35,8 @@ KWindowEffectsPrivate *createEffects() override; KWindowSystemPrivate *createWindowSystem() override; KWindowInfoPrivate *createWindowInfo(WId window, NET::Properties properties, NET::Properties2 properties2) override; + KWindowShadowTilePrivate *createWindowShadowTile() override; + KWindowShadowPrivate *createWindowShadow() override; }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/waylandintegration.cpp new/kwayland-integration-5.19.0/src/windowsystem/waylandintegration.cpp --- old/kwayland-integration-5.18.5/src/windowsystem/waylandintegration.cpp 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/src/windowsystem/waylandintegration.cpp 2020-06-04 13:16:18.000000000 +0200 @@ -1,6 +1,7 @@ /* * Copyright 2014 Martin Gräßlin <mgraess...@kde.org> * Copyright 2015 Marco Martin <m...@kde.org> + * Copyright 2020 Vlad Zahorodnii <vlad.zahorod...@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,6 +33,8 @@ #include <KWayland/Client/contrast.h> #include <KWayland/Client/region.h> #include <KWayland/Client/slide.h> +#include <KWayland/Client/shadow.h> +#include <KWayland/Client/shm_pool.h> #include <KWindowSystem/KWindowSystem> @@ -143,6 +146,28 @@ return m_waylandSlideManager; } +KWayland::Client::ShadowManager *WaylandIntegration::waylandShadowManager() +{ + if (!m_waylandShadowManager && m_registry) { + const KWayland::Client::Registry::AnnouncedInterface wmInterface = m_registry->interface(KWayland::Client::Registry::Interface::Shadow); + + if (wmInterface.name == 0) { + qCWarning(KWAYLAND_KWS) << "This compositor does not support the Shadow interface"; + return nullptr; + } + + m_waylandShadowManager = m_registry->createShadowManager(wmInterface.name, wmInterface.version, qApp); + + connect(m_waylandShadowManager, &KWayland::Client::ShadowManager::removed, this, + [this] () { + m_waylandShadowManager->deleteLater(); + } + ); + } + + return m_waylandShadowManager; +} + KWayland::Client::Compositor *WaylandIntegration::waylandCompositor() const { return m_waylandCompositor; @@ -208,3 +233,24 @@ } return m_waylandPlasmaShell; } + +KWayland::Client::ShmPool *WaylandIntegration::waylandShmPool() +{ + if (!m_waylandShmPool && m_registry) { + const KWayland::Client::Registry::AnnouncedInterface wmInterface = m_registry->interface(KWayland::Client::Registry::Interface::Shm); + + if (wmInterface.name == 0) { + return nullptr; + } + + m_waylandShmPool = m_registry->createShmPool(wmInterface.name, wmInterface.version, qApp); + + connect(m_waylandShmPool, &KWayland::Client::ShmPool::removed, this, + [this] () { + m_waylandShmPool->deleteLater(); + } + ); + } + + return m_waylandShmPool; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/waylandintegration.h new/kwayland-integration-5.19.0/src/windowsystem/waylandintegration.h --- old/kwayland-integration-5.18.5/src/windowsystem/waylandintegration.h 2020-05-05 16:45:05.000000000 +0200 +++ new/kwayland-integration-5.19.0/src/windowsystem/waylandintegration.h 2020-06-04 13:16:18.000000000 +0200 @@ -1,6 +1,7 @@ /* * Copyright 2014 Martin Gräßlin <mgraess...@kde.org> * Copyright 2015 Marco Martin <m...@kde.org> + * Copyright 2020 Vlad Zahorodnii <vlad.zahorod...@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -35,6 +36,8 @@ class PlasmaWindowManagement; class PlasmaShell; class Registry; + class ShadowManager; + class ShmPool; class SlideManager; } } @@ -52,9 +55,11 @@ KWayland::Client::BlurManager *waylandBlurManager(); KWayland::Client::ContrastManager *waylandContrastManager(); KWayland::Client::SlideManager *waylandSlideManager(); + KWayland::Client::ShadowManager *waylandShadowManager(); KWayland::Client::Compositor *waylandCompositor() const; KWayland::Client::PlasmaWindowManagement *plasmaWindowManagement(); KWayland::Client::PlasmaShell *waylandPlasmaShell(); + KWayland::Client::ShmPool *waylandShmPool(); private: QPointer<KWayland::Client::ConnectionThread> m_waylandConnection; @@ -63,8 +68,10 @@ QPointer<KWayland::Client::BlurManager> m_waylandBlurManager; QPointer<KWayland::Client::ContrastManager> m_waylandContrastManager; QPointer<KWayland::Client::SlideManager> m_waylandSlideManager; + QPointer<KWayland::Client::ShadowManager> m_waylandShadowManager; QPointer<KWayland::Client::PlasmaWindowManagement> m_wm; QPointer<KWayland::Client::PlasmaShell> m_waylandPlasmaShell; + QPointer<KWayland::Client::ShmPool> m_waylandShmPool; }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/windowshadow.cpp new/kwayland-integration-5.19.0/src/windowsystem/windowshadow.cpp --- old/kwayland-integration-5.18.5/src/windowsystem/windowshadow.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kwayland-integration-5.19.0/src/windowsystem/windowshadow.cpp 2020-06-04 13:16:18.000000000 +0200 @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Vlad Zahorodnii <vlad.zahorod...@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) version 3, or any + * later version accepted by the membership of KDE e.V. (or its + * successor approved by the membership of KDE e.V.), which shall + * act as a proxy defined in Section 6 of version 3 of the license. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "windowshadow.h" +#include "waylandintegration.h" + +#include <KWayland/Client/shm_pool.h> +#include <KWayland/Client/surface.h> + +bool WindowShadowTile::create() +{ + KWayland::Client::ShmPool *shmPool = WaylandIntegration::self()->waylandShmPool(); + if (!shmPool) { + return false; + } + buffer = shmPool->createBuffer(image); + return true; +} + +void WindowShadowTile::destroy() +{ + buffer = nullptr; +} + +WindowShadowTile *WindowShadowTile::get(const KWindowShadowTile *tile) +{ + KWindowShadowTilePrivate *d = KWindowShadowTilePrivate::get(tile); + return static_cast<WindowShadowTile *>(d); +} + +static KWayland::Client::Buffer::Ptr bufferForTile(const KWindowShadowTile::Ptr &tile) +{ + if (!tile) { + return KWayland::Client::Buffer::Ptr(); + } + WindowShadowTile *d = WindowShadowTile::get(tile.data()); + return d->buffer; +} + +bool WindowShadow::create() +{ + KWayland::Client::ShadowManager *shadowManager = WaylandIntegration::self()->waylandShadowManager(); + if (!shadowManager) { + return false; + } + KWayland::Client::Surface *surface = KWayland::Client::Surface::fromWindow(window); + if (!surface) { + return false; + } + + shadow = shadowManager->createShadow(surface, surface); + shadow->attachLeft(bufferForTile(leftTile)); + shadow->attachTopLeft(bufferForTile(topLeftTile)); + shadow->attachTop(bufferForTile(topTile)); + shadow->attachTopRight(bufferForTile(topRightTile)); + shadow->attachRight(bufferForTile(rightTile)); + shadow->attachBottomRight(bufferForTile(bottomRightTile)); + shadow->attachBottom(bufferForTile(bottomTile)); + shadow->attachBottomLeft(bufferForTile(bottomLeftTile)); + shadow->setOffsets(padding); + shadow->commit(); + + // Commit wl_surface at the next available time. + window->requestUpdate(); + + return true; +} + +void WindowShadow::destroy() +{ + if (!shadow) { + return; + } + KWayland::Client::ShadowManager *shadowManager = WaylandIntegration::self()->waylandShadowManager(); + if (!shadowManager) { + return; + } + KWayland::Client::Surface *surface = KWayland::Client::Surface::fromWindow(window); + if (!surface) { + return; + } + shadowManager->removeShadow(surface); + shadow = nullptr; + window->requestUpdate(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-integration-5.18.5/src/windowsystem/windowshadow.h new/kwayland-integration-5.19.0/src/windowsystem/windowshadow.h --- old/kwayland-integration-5.18.5/src/windowsystem/windowshadow.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kwayland-integration-5.19.0/src/windowsystem/windowshadow.h 2020-06-04 13:16:18.000000000 +0200 @@ -0,0 +1,48 @@ +/* + * Copyright 2020 Vlad Zahorodnii <vlad.zahorod...@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) version 3, or any + * later version accepted by the membership of KDE e.V. (or its + * successor approved by the membership of KDE e.V.), which shall + * act as a proxy defined in Section 6 of version 3 of the license. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef WINDOWSHADOW_H +#define WINDOWSHADOW_H + +#include <KWayland/Client/buffer.h> +#include <KWayland/Client/shadow.h> +#include <KWindowSystem/private/kwindowshadow_p.h> + +class WindowShadowTile final : public KWindowShadowTilePrivate +{ +public: + bool create() override; + void destroy() override; + + static WindowShadowTile *get(const KWindowShadowTile *tile); + + KWayland::Client::Buffer::Ptr buffer; +}; + +class WindowShadow final : public KWindowShadowPrivate +{ +public: + bool create() override; + void destroy() override; + + QPointer<KWayland::Client::Shadow> shadow; +}; + +#endif // WINDOWSHADOW_H