diff --git a/kwin-fix-screensharing-for-xwayland-apps.patch b/kwin-fix-screensharing-for-xwayland-apps.patch new file mode 100644 index 0000000..c765fbd --- /dev/null +++ b/kwin-fix-screensharing-for-xwayland-apps.patch @@ -0,0 +1,16 @@ +diff --git a/screencast/pipewirestream.cpp b/screencast/pipewirestream.cpp +index 1203d14..846b6a4 100644 +--- a/screencast/pipewirestream.cpp ++++ b/screencast/pipewirestream.cpp +@@ -235,7 +235,10 @@ bool PipeWireStream::createStream() + + spa_rectangle resolution = SPA_RECTANGLE(uint32_t(m_resolution.width()), uint32_t(m_resolution.height())); + +- const auto format = m_hasAlpha ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR; ++ auto canCreateDmaBuf = [this] () -> bool { ++ return QSharedPointer(kwinApp()->platform()->createDmaBufTexture(m_resolution)); ++ }; ++ const auto format = m_hasAlpha || canCreateDmaBuf() ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR; + + const spa_pod *param = (spa_pod*)spa_pod_builder_add_object(&podBuilder, + SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat, diff --git a/kwin.spec b/kwin.spec index 5936c22..acffa4c 100644 --- a/kwin.spec +++ b/kwin.spec @@ -17,7 +17,7 @@ Name: kwin Version: 5.20.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: KDE Window manager # all sources are effectively GPLv2+, except for: @@ -39,6 +39,7 @@ Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}. ## upstream patches Patch0: kwin-do-not-refresh-x11-clipboard-while-fetching.patch +Patch1: kwin-fix-screensharing-for-xwayland-apps.patch # Base BuildRequires: extra-cmake-modules @@ -356,6 +357,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||: %changelog +* Mon Nov 30 2020 Jan Grulich - 5.20.3-3 +- Fix screensharing for xwayland apps + * Mon Nov 23 07:53:19 CET 2020 Jan Grulich - 5.20.3-2 - rebuild (qt5)