diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-04-16 13:07:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-04-16 13:07:24 +0100 |
commit | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (patch) | |
tree | 464c922e949c7e4d5d891fb2cdda5daee5612537 /kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch | |
parent | e68d405c5d712af4387159df07e226217bdda049 (diff) |
gentoo resync : 16.04.2022
Diffstat (limited to 'kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch')
-rw-r--r-- | kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch b/kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch new file mode 100644 index 000000000000..e40189ab2744 --- /dev/null +++ b/kde-plasma/kwayland-server/files/kwayland-server-5.24.4-guard-subsurface-parent-access.patch @@ -0,0 +1,44 @@ +From 6dcf73adaafeaa40c05e22df5f1c10af88df362b Mon Sep 17 00:00:00 2001 +From: David Edmundson <kde@davidedmundson.co.uk> +Date: Wed, 30 Mar 2022 14:57:12 +0100 +Subject: [PATCH] Guard subsurface parent access. + +Whilst a subsurface must have a parent at the time of creation, the +lifespan is not guaranteed afterwards. + +It's a weird thing for a client to do, but we need to not crash +afterwards. + +If the parent surface is destroyed we should consider the surface +unmapped. + +BUG: 452044 + + +(cherry picked from commit 1d2424a56a13dc55aeab699a38234a7cafa091d8) +--- + src/server/surface_interface.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/server/surface_interface.cpp b/src/server/surface_interface.cpp +index ef2584f4..8bfac95f 100644 +--- a/src/server/surface_interface.cpp ++++ b/src/server/surface_interface.cpp +@@ -678,7 +678,13 @@ void SurfaceInterfacePrivate::commitFromCache() + + bool SurfaceInterfacePrivate::computeEffectiveMapped() const + { +- return bufferRef && (!subSurface || subSurface->parentSurface()->isMapped()); ++ if (!bufferRef) { ++ return false; ++ } ++ if (subSurface) { ++ return subSurface->parentSurface() && subSurface->parentSurface()->isMapped(); ++ } ++ return true; + } + + void SurfaceInterfacePrivate::updateEffectiveMapped() +-- +GitLab + |