Add upstream fix for rhbz#2256254 - kwin-wayland crash on app resizes

epel9
Janne Grunau 12 months ago
parent 37cf467dbd
commit aa59c53229

@ -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 <janne-fdr@jannau.net> - 5.27.10-2
- Add upstream fix for rhbz#2256254 - kwin-wayland crash on app resizes
* Sat Dec 16 2023 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 5.27.10-1
- 5.27.10

@ -0,0 +1,38 @@
From 0d59f48fbf2cbbcc71556f0ce005d939c604f2c4 Mon Sep 17 00:00:00 2001
From: Xaver Hugl <xaver.hugl@gmail.com>
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
Loading…
Cancel
Save