epel9
Jan Grulich 4 years ago
parent 5039bc6f75
commit 7aa2989746

1
.gitignore vendored

@ -67,3 +67,4 @@
/kwin-5.20.1.tar.xz
/kwin-5.20.2.tar.xz
/kwin-5.20.3.tar.xz
/kwin-5.20.4.tar.xz

@ -1,74 +0,0 @@
From d335070b80c2f3bc5674355e3edba61bc010bc36 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 20 Oct 2020 02:29:01 +0200
Subject: [PATCH] xwl: Do not refresh the x11 Clipboard while fetching
At the moment there was a race condition when putting something into the
keyboard from XWayland apps. The clipboard manager would announce a new
thing before we'd submitted it all resulting in a broken state.
This change detects when it's fetching and will only refresh the source
after everything has been sent.
BUG: 424754
CCBUG: 412350
---
xwl/clipboard.cpp | 10 ++++++++++
xwl/clipboard.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/xwl/clipboard.cpp b/xwl/clipboard.cpp
index 37a5c3b..87ee5cd 100644
--- a/xwl/clipboard.cpp
+++ b/xwl/clipboard.cpp
@@ -66,6 +66,10 @@ Clipboard::Clipboard(xcb_atom_t atom, QObject *parent)
void Clipboard::wlSelectionChanged(KWaylandServer::AbstractDataSource *dsi)
{
+ if (m_waitingForTargets) {
+ return;
+ }
+
if (dsi && !ownsSelection(dsi)) {
// Wayland native client provides new selection
if (!m_checkConnection) {
@@ -88,6 +92,10 @@ bool Clipboard::ownsSelection(KWaylandServer::AbstractDataSource *dsi) const
void Clipboard::checkWlSource()
{
+ if (m_waitingForTargets) {
+ return;
+ }
+
auto dsi = waylandServer()->seat()->selection();
auto removeSource = [this] {
if (wlSource()) {
@@ -145,11 +153,13 @@ void Clipboard::doHandleXfixesNotify(xcb_xfixes_selection_notify_event_t *event)
if (X11Source *source = x11Source()) {
source->getTargets();
+ m_waitingForTargets = true;
}
}
void Clipboard::x11OffersChanged(const QStringList &added, const QStringList &removed)
{
+ m_waitingForTargets = false;
X11Source *source = x11Source();
if (!source) {
return;
diff --git a/xwl/clipboard.h b/xwl/clipboard.h
index c229684..f534d1f 100644
--- a/xwl/clipboard.h
+++ b/xwl/clipboard.h
@@ -53,6 +53,7 @@ private:
QMetaObject::Connection m_checkConnection;
Q_DISABLE_COPY(Clipboard)
+ bool m_waitingForTargets = false;
};
} // namespace Xwl
--
GitLab

@ -1,16 +0,0 @@
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<DmaBufTexture>(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,

@ -16,8 +16,8 @@
%endif
Name: kwin
Version: 5.20.3
Release: 3%{?dist}
Version: 5.20.4
Release: 1%{?dist}
Summary: KDE Window manager
# all sources are effectively GPLv2+, except for:
@ -38,8 +38,6 @@ URL: https://userbase.kde.org/KWin
Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz
## 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
@ -357,6 +355,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||:
%changelog
* Tue Dec 1 09:42:59 CET 2020 Jan Grulich <jgrulich@redhat.com> - 5.20.4-1
- 5.20.4
* Mon Nov 30 2020 Jan Grulich <jgrulich@redhat.com> - 5.20.3-3
- Fix screensharing for xwayland apps

@ -1 +1 @@
SHA512 (kwin-5.20.3.tar.xz) = a156ef06fad48402a98e13dbaeeddf0f84e74b969198be631a3519fd36216968914ff4dca90e74b9d7a15b2ee7479791822006e13046e6ad4f1463faeac759e1
SHA512 (kwin-5.20.4.tar.xz) = b402ce6fea79d4c41d10b76d48f5737c10321ca5ab4a2b188646d8fe2b8ea346813091412a7dbd1246eb70ea3f4cd6961d577c19c325a9b5d94083961e0ed512

Loading…
Cancel
Save