From f1157a5e583741d079a81733261d3b120a40b953 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 14 May 2021 13:37:33 -0500 Subject: [PATCH] 5.21.90 --- .gitignore | 1 + kwin-fix-focus-follows-mouse-policy.patch | 89 ------------------- ...dmabufs-only-when-client-asks-for-it.patch | 55 ------------ kwin.spec | 10 +-- sources | 2 +- 5 files changed, 7 insertions(+), 150 deletions(-) delete mode 100644 kwin-fix-focus-follows-mouse-policy.patch delete mode 100644 kwin-use-dmabufs-only-when-client-asks-for-it.patch diff --git a/.gitignore b/.gitignore index 4c7c351..0221f4a 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,4 @@ /kwin-5.21.3.tar.xz /kwin-5.21.4.tar.xz /kwin-5.21.5.tar.xz +/kwin-5.21.90.tar.xz diff --git a/kwin-fix-focus-follows-mouse-policy.patch b/kwin-fix-focus-follows-mouse-policy.patch deleted file mode 100644 index a1e1d42..0000000 --- a/kwin-fix-focus-follows-mouse-policy.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 073b6efc144d8aabef2eea8f64b84ffdca87b6b5 Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii -Date: Mon, 3 May 2021 11:24:22 +0300 -Subject: [PATCH] wayland: Fix focus follows mouse policy - -We want to update the input focus only if the pointer is moved. Due to -that, AbstractClient::enterEvent() checks the last seen pointer position -to decide whether the window needs to be focused. - -The issue is that when the pointer moves from a decoration to a surface, -the cached pointer position will be updated to the current pointer -position, and thus the check in AbstractClient::enterEvent() will fail. - -We need to update the cached pointer position only if there is a focused -decoration. ---- - src/input.cpp | 26 +++++++++++++------------- - src/pointer_input.cpp | 2 -- - 2 files changed, 13 insertions(+), 15 deletions(-) - -diff --git a/src/input.cpp b/src/input.cpp -index 9377e9334..b1b961e39 100644 ---- a/input.cpp -+++ b/input.cpp -@@ -2846,6 +2846,7 @@ void InputDeviceHandler::update() - setAt(toplevel); - - if (focusUpdatesBlocked()) { -+ workspace()->updateFocusMousePosition(position().toPoint()); - return; - } - -@@ -2860,21 +2861,20 @@ void InputDeviceHandler::update() - // went onto or off from decoration, update focus - updateFocus(); - } -- return; -- } -- updateInternalWindow(nullptr); -+ } else { -+ updateInternalWindow(nullptr); - -- if (m_focus.focus != m_at.at) { -- // focus change -- updateDecoration(); -- updateFocus(); -- return; -- } -- // check if switched to/from decoration while staying on the same Toplevel -- if (updateDecoration()) { -- // went onto or off from decoration, update focus -- updateFocus(); -+ if (m_focus.focus != m_at.at) { -+ // focus change -+ updateDecoration(); -+ updateFocus(); -+ } else if (updateDecoration()) { -+ // went onto or off from decoration, update focus -+ updateFocus(); -+ } - } -+ -+ workspace()->updateFocusMousePosition(position().toPoint()); - } - - Toplevel *InputDeviceHandler::at() const -diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp -index bf59197d3..a93c2cf55 100644 ---- a/pointer_input.cpp -+++ b/pointer_input.cpp -@@ -473,7 +473,6 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl - { - disconnect(m_decorationGeometryConnection); - m_decorationGeometryConnection = QMetaObject::Connection(); -- workspace()->updateFocusMousePosition(position().toPoint()); - - if (old) { - // send leave event to old decoration -@@ -524,7 +523,6 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow - - if (AbstractClient *ac = qobject_cast(focusNow)) { - ac->enterEvent(m_pos.toPoint()); -- workspace()->updateFocusMousePosition(m_pos.toPoint()); - } - - if (internalWindow()) { --- -GitLab - diff --git a/kwin-use-dmabufs-only-when-client-asks-for-it.patch b/kwin-use-dmabufs-only-when-client-asks-for-it.patch deleted file mode 100644 index a2234ca..0000000 --- a/kwin-use-dmabufs-only-when-client-asks-for-it.patch +++ /dev/null @@ -1,55 +0,0 @@ -From caaabf84df3aaf96eb0fcccc8c17baefe97826b5 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Wed, 5 May 2021 10:01:49 +0200 -Subject: [PATCH] Screencast: use dma-bufs only when client explicitly asks for - it - ---- - plugins/screencast/pipewirestream.cpp | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/plugins/screencast/pipewirestream.cpp b/plugins/screencast/pipewirestream.cpp -index 8f9ed30e0..1e86f8b81 100644 ---- a/plugins/screencast/pipewirestream.cpp -+++ b/plugins/screencast/pipewirestream.cpp -@@ -106,13 +106,16 @@ void PipeWireStream::onStreamParamChanged(void *data, uint32_t id, const struct - - void PipeWireStream::onStreamAddBuffer(void *data, pw_buffer *buffer) - { -+ QSharedPointer dmabuf; - PipeWireStream *stream = static_cast(data); - struct spa_data *spa_data = buffer->buffer->datas; - - spa_data->mapoffset = 0; - spa_data->flags = SPA_DATA_FLAG_READWRITE; - -- QSharedPointer dmabuf(kwinApp()->platform()->createDmaBufTexture(stream->m_resolution)); -+ if (spa_data[0].type != SPA_ID_INVALID && spa_data[0].type & (1 << SPA_DATA_DmaBuf)) -+ dmabuf.reset(kwinApp()->platform()->createDmaBufTexture(stream->m_resolution)); -+ - if (dmabuf) { - spa_data->type = SPA_DATA_DmaBuf; - spa_data->fd = dmabuf->fd(); -@@ -122,6 +125,11 @@ void PipeWireStream::onStreamAddBuffer(void *data, pw_buffer *buffer) - stream->m_dmabufDataForPwBuffer.insert(buffer, dmabuf); - #ifdef F_SEAL_SEAL //Disable memfd on systems that don't have it, like BSD < 12 - } else { -+ if (!(spa_data[0].type & (1 << SPA_DATA_MemFd))) { -+ qCCritical(KWIN_SCREENCAST) << "memfd: Client doesn't support memfd buffer data type"; -+ return; -+ } -+ - const int bytesPerPixel = stream->m_hasAlpha ? 4 : 3; - const int stride = SPA_ROUND_UP_N (stream->m_resolution.width() * bytesPerPixel, 4); - spa_data->maxsize = stride * stream->m_resolution.height(); -@@ -341,7 +349,7 @@ void PipeWireStream::recordFrame(GLTexture *frameTexture, const QRegion &damaged - - const auto size = frameTexture->size(); - spa_data->chunk->offset = 0; -- if (data) { -+ if (data || spa_data[0].type == SPA_DATA_MemFd) { - const int bpp = data && !m_hasAlpha ? 3 : 4; - const uint stride = SPA_ROUND_UP_N (size.width() * bpp, 4); - const uint bufferSize = stride * size.height(); --- -GitLab diff --git a/kwin.spec b/kwin.spec index 7584b7f..1e34337 100644 --- a/kwin.spec +++ b/kwin.spec @@ -16,8 +16,8 @@ %endif Name: kwin -Version: 5.21.5 -Release: 3%{?dist} +Version: 5.21.90 +Release: 1%{?dist} Summary: KDE Window manager # all sources are effectively GPLv2+, except for: @@ -37,9 +37,6 @@ URL: https://userbase.kde.org/KWin Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz ## upstream patches -Patch0: kwin-use-dmabufs-only-when-client-asks-for-it.patch -# https://bugs.kde.org/show_bug.cgi?id=395970 -Patch1: kwin-fix-focus-follows-mouse-policy.patch ## proposed patches @@ -363,6 +360,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||: %changelog +* Fri May 14 2021 Rex Dieter - 5.21.90-1 +- 5.21.90 + * Thu May 13 2021 Jonathan Wakely - 5.21.5-3 - Add patch to fix focus follows mouse (#1960208) diff --git a/sources b/sources index 79a30d5..9abf2ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kwin-5.21.5.tar.xz) = b749892b12b027b306836bbd7b770602bff80c0ce6840db3345585a1215b415fe24fb823bbcb399f76999232f100bb2e1898d460160e1a762ea10fd24d6cf63c +SHA512 (kwin-5.21.90.tar.xz) = de9004260e96c90bb4f4253c6c10f79acee9b7676fca2f61140232c26c3bb842ca56776ecebc734d37000625fccfc39d14d51fab203e7db493361e43272c94e8