From aa59c5322935360ea166b31c0cafd5aab4577585 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 20 Jan 2024 14:02:04 +0100 Subject: [PATCH 1/2] Add upstream fix for rhbz#2256254 - kwin-wayland crash on app resizes --- kwin.spec | 7 +++- xdgshellwindow-fix-maxSize-constraints.patch | 38 ++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 xdgshellwindow-fix-maxSize-constraints.patch diff --git a/kwin.spec b/kwin.spec index 3794d46..c0dfb80 100644 --- a/kwin.spec +++ b/kwin.spec @@ -17,7 +17,7 @@ Name: kwin Version: 5.27.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Window manager # all sources are effectively GPLv2+, except for: @@ -37,6 +37,8 @@ URL: https://userbase.kde.org/KWin Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz ## upstream patches +# https://invent.kde.org/plasma/kwin/-/commit/0d59f48fbf2cbbcc71556f0ce005d939c604f2c4 +Patch0: xdgshellwindow-fix-maxSize-constraints.patch # Base BuildRequires: extra-cmake-modules @@ -361,6 +363,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||: %changelog +* Sat Jan 20 2024 Janne Grunau - 5.27.10-2 +- Add upstream fix for rhbz#2256254 - kwin-wayland crash on app resizes + * Sat Dec 16 2023 Marc Deop i Argemí - 5.27.10-1 - 5.27.10 diff --git a/xdgshellwindow-fix-maxSize-constraints.patch b/xdgshellwindow-fix-maxSize-constraints.patch new file mode 100644 index 0000000..8f3dac0 --- /dev/null +++ b/xdgshellwindow-fix-maxSize-constraints.patch @@ -0,0 +1,38 @@ +From 0d59f48fbf2cbbcc71556f0ce005d939c604f2c4 Mon Sep 17 00:00:00 2001 +From: Xaver Hugl +Date: Mon, 11 Dec 2023 18:06:31 +0100 +Subject: [PATCH] xdgshellwindow: make maxSize always >= minSize by enforcing + the same minimum + +BUG: 478269 + + +(cherry picked from commit d228dc173a24bc27a895d4924936a1d91d7c25b9) +--- + src/xdgshellwindow.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp +index 29d8623cac3..525481f00dd 100644 +--- a/src/xdgshellwindow.cpp ++++ b/src/xdgshellwindow.cpp +@@ -601,12 +601,14 @@ MaximizeMode XdgToplevelWindow::requestedMaximizeMode() const + QSizeF XdgToplevelWindow::minSize() const + { + const int enforcedMinimum = m_nextDecoration ? 150 : 20; +- return rules()->checkMinSize(QSize(std::max(enforcedMinimum, m_shellSurface->minimumSize().width()), std::max(enforcedMinimum, m_shellSurface->minimumSize().height()))); ++ return rules()->checkMinSize(m_shellSurface->minimumSize()).expandedTo(QSizeF(enforcedMinimum, enforcedMinimum)); + } + + QSizeF XdgToplevelWindow::maxSize() const + { +- return rules()->checkMaxSize(m_shellSurface->maximumSize()); ++ // enforce the same minimum as for minSize, so that maxSize is always bigger than minSize ++ const int enforcedMinimum = m_nextDecoration ? 150 : 20; ++ return rules()->checkMaxSize(m_shellSurface->maximumSize()).expandedTo(QSizeF(enforcedMinimum, enforcedMinimum)); + } + + bool XdgToplevelWindow::isFullScreen() const +-- +GitLab + From 8b476c5c04f5521027d5f66a8451cb661f0950c7 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Mon, 12 Feb 2024 14:00:58 +0100 Subject: [PATCH 2/2] Add xwayland pkgconfig build dependency to use listenfd > kwin_wayland_wrapper[2332]: (WW) Option "-listen" for file descriptors is deprecated -listen is deprecated in favor of -listenfd but kwin is going to use -listenfd only if the corresponding flag in pkg-config data is set --- kwin.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kwin.spec b/kwin.spec index c0dfb80..d45d037 100644 --- a/kwin.spec +++ b/kwin.spec @@ -17,7 +17,7 @@ Name: kwin Version: 5.27.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: KDE Window manager # all sources are effectively GPLv2+, except for: @@ -90,6 +90,7 @@ BuildRequires: wayland-protocols-devel BuildRequires: libxkbcommon-devel >= 0.4 BuildRequires: pkgconfig(libinput) >= 0.10 BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(xwayland) # KF5 BuildRequires: kf5-kcompletion-devel @@ -363,6 +364,9 @@ make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||: %changelog +* Mon Feb 12 2024 Alessandro Astone - 5.27.10-3 +- Add xwayland pkgconfig build dependency to use listenfd + * Sat Jan 20 2024 Janne Grunau - 5.27.10-2 - Add upstream fix for rhbz#2256254 - kwin-wayland crash on app resizes