From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/, kde-plasma/kwin/files/
Date: Tue, 18 Feb 2025 18:58:41 +0000 (UTC) [thread overview]
Message-ID: <1739905085.2bca6ba8b0bdacccb883071046b7a9b50ce32231.sam@gentoo> (raw)
commit: 2bca6ba8b0bdacccb883071046b7a9b50ce32231
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 18 18:57:14 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 18 18:58:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bca6ba8
kde-plasma/kwin: pull in workaround for GCC 15
Pull in workaround from upstream PR at https://invent.kde.org/plasma/kwin/-/merge_requests/7191.
(There's changes requested before it gets merged but they're cosmetic.)
No revbump as 6.3.1 was just pushed.
Bug: https://bugs.kde.org/show_bug.cgi?id=500310
Bug: https://gcc.gnu.org/PR118923
Thanks-to: Kacper Słomiński <kacper.slominski72 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../kwin/files/kwin-6.3.1-gcc15-workaround.patch | 92 ++++++++++++++++++++++
kde-plasma/kwin/kwin-6.3.1.ebuild | 4 +
2 files changed, 96 insertions(+)
diff --git a/kde-plasma/kwin/files/kwin-6.3.1-gcc15-workaround.patch b/kde-plasma/kwin/files/kwin-6.3.1-gcc15-workaround.patch
new file mode 100644
index 000000000000..3990682a5f9d
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-6.3.1-gcc15-workaround.patch
@@ -0,0 +1,92 @@
+https://invent.kde.org/plasma/kwin/-/merge_requests/7191
+https://bugs.kde.org/show_bug.cgi?id=500310
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118923
+
+From 4d9a024f1b2f502de9a33024a2a762aefa4007cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?=
+ <kacper.slominski72@gmail.com>
+Date: Tue, 18 Feb 2025 18:16:59 +0100
+Subject: [PATCH] Factor out {previousRestricted,restricted}MoveArea calls out
+ of loops
+
+This works around a GCC 15 bug that causes KWin to crash.
+
+BUG: 500310
+---
+ src/window.cpp | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/src/window.cpp b/src/window.cpp
+index a05771e90c..1a56560280 100644
+--- a/src/window.cpp
++++ b/src/window.cpp
+@@ -4026,25 +4026,29 @@ void Window::checkWorkspacePosition(QRectF oldGeometry, const VirtualDesktop *ol
+ auto moveAreaFunc = workspace()->inRearrange() ? &Workspace::previousRestrictedMoveArea : //... the restricted areas changed
+ &Workspace::restrictedMoveArea; //... when e.g. active desktop or screen changes
+
+- for (const QRect &r : (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaTop)) {
++ const auto oldRectsTop = (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaTop);
++ for (const QRect &r : oldRectsTop) {
+ QRect rect = r & oldGeomTall;
+ if (!rect.isEmpty()) {
+ oldTopMax = std::max(oldTopMax, rect.y() + rect.height());
+ }
+ }
+- for (const QRect &r : (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaRight)) {
++ const auto oldRectsRight = (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaRight);
++ for (const QRect &r : oldRectsRight) {
+ QRect rect = r & oldGeomWide;
+ if (!rect.isEmpty()) {
+ oldRightMax = std::min(oldRightMax, rect.x());
+ }
+ }
+- for (const QRect &r : (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaBottom)) {
++ const auto oldRectsBottom = (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaBottom);
++ for (const QRect &r : oldRectsBottom) {
+ QRect rect = r & oldGeomTall;
+ if (!rect.isEmpty()) {
+ oldBottomMax = std::min(oldBottomMax, rect.y());
+ }
+ }
+- for (const QRect &r : (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaLeft)) {
++ const auto oldRectsLeft = (workspace()->*moveAreaFunc)(oldDesktop, StrutAreaLeft);
++ for (const QRect &r : oldRectsLeft) {
+ QRect rect = r & oldGeomWide;
+ if (!rect.isEmpty()) {
+ oldLeftMax = std::max(oldLeftMax, rect.x() + rect.width());
+@@ -4052,25 +4056,29 @@ void Window::checkWorkspacePosition(QRectF oldGeometry, const VirtualDesktop *ol
+ }
+
+ // These 4 compute new bounds
+- for (const QRect &r : workspace()->restrictedMoveArea(desktop, StrutAreaTop)) {
++ const auto newRectsTop = workspace()->restrictedMoveArea(desktop, StrutAreaTop);
++ for (const QRect &r : newRectsTop) {
+ QRect rect = r & newGeomTall;
+ if (!rect.isEmpty()) {
+ topMax = std::max(topMax, rect.y() + rect.height());
+ }
+ }
+- for (const QRect &r : workspace()->restrictedMoveArea(desktop, StrutAreaRight)) {
++ const auto newRectsRight = workspace()->restrictedMoveArea(desktop, StrutAreaRight);
++ for (const QRect &r : newRectsRight) {
+ QRect rect = r & newGeomWide;
+ if (!rect.isEmpty()) {
+ rightMax = std::min(rightMax, rect.x());
+ }
+ }
+- for (const QRect &r : workspace()->restrictedMoveArea(desktop, StrutAreaBottom)) {
++ const auto newRectsBottom = workspace()->restrictedMoveArea(desktop, StrutAreaBottom);
++ for (const QRect &r : newRectsBottom) {
+ QRect rect = r & newGeomTall;
+ if (!rect.isEmpty()) {
+ bottomMax = std::min(bottomMax, rect.y());
+ }
+ }
+- for (const QRect &r : workspace()->restrictedMoveArea(desktop, StrutAreaLeft)) {
++ const auto newRectsLeft = workspace()->restrictedMoveArea(desktop, StrutAreaLeft);
++ for (const QRect &r : newRectsLeft) {
+ QRect rect = r & newGeomWide;
+ if (!rect.isEmpty()) {
+ leftMax = std::max(leftMax, rect.x() + rect.width());
+--
+GitLab
diff --git a/kde-plasma/kwin/kwin-6.3.1.ebuild b/kde-plasma/kwin/kwin-6.3.1.ebuild
index b500c5ad9597..26d567553ec5 100644
--- a/kde-plasma/kwin/kwin-6.3.1.ebuild
+++ b/kde-plasma/kwin/kwin-6.3.1.ebuild
@@ -114,6 +114,10 @@ BDEPEND="
# -m 0755 to avoid suid with USE="-filecaps"
FILECAPS=( -m 0755 cap_sys_nice=ep usr/bin/kwin_wayland )
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc15-workaround.patch
+)
+
src_prepare() {
ecm_src_prepare
next reply other threads:[~2025-02-18 18:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 18:58 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-12 19:29 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/, kde-plasma/kwin/files/ Andreas Sturmlechner
2024-12-02 19:39 Andreas Sturmlechner
2024-06-13 0:46 Sam James
2024-03-13 21:17 Andreas Sturmlechner
2023-12-16 9:10 Andreas Sturmlechner
2023-09-30 10:00 Andreas Sturmlechner
2023-09-20 13:15 Andreas Sturmlechner
2023-05-12 20:42 Andreas Sturmlechner
2022-08-07 20:58 Andreas Sturmlechner
2022-07-26 12:08 Andreas Sturmlechner
2021-12-10 14:58 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2021-09-21 18:44 Andreas Sturmlechner
2021-09-14 9:04 Andreas Sturmlechner
2021-01-23 0:25 Andreas Sturmlechner
2020-06-07 21:00 Andreas Sturmlechner
2020-06-01 10:13 Andreas Sturmlechner
2019-12-17 23:49 Andreas Sturmlechner
2018-11-18 0:17 Andreas Sturmlechner
2017-07-27 17:46 Andreas Sturmlechner
2017-04-15 15:11 Andreas Sturmlechner
2017-04-15 15:11 Andreas Sturmlechner
2016-06-26 20:36 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1739905085.2bca6ba8b0bdacccb883071046b7a9b50ce32231.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox