summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2022-01-12 20:55:20 +0100
committerStephan Hartmann <sultan@gentoo.org>2022-01-12 20:56:10 +0100
commit65d397e4463368cb67058b2c9ca56a2820a5bd77 (patch)
tree6534e45f069b12e4d0cebb338e6525402720e7a2 /www-client
parentdev-vcs/tig: Sync 9999 (diff)
downloadgentoo-65d397e4463368cb67058b2c9ca56a2820a5bd77.tar.gz
gentoo-65d397e4463368cb67058b2c9ca56a2820a5bd77.tar.bz2
gentoo-65d397e4463368cb67058b2c9ca56a2820a5bd77.zip
www-client/chromium: fix tag dragging (M97)
Bug: https://bugs.gentoo.org/830990 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client')
-rw-r--r--www-client/chromium/chromium-97.0.4692.71-r1.ebuild (renamed from www-client/chromium/chromium-97.0.4692.71.ebuild)2
-rw-r--r--www-client/chromium/files/chromium-97-fix-tag-dragging.patch52
2 files changed, 54 insertions, 0 deletions
diff --git a/www-client/chromium/chromium-97.0.4692.71.ebuild b/www-client/chromium/chromium-97.0.4692.71-r1.ebuild
index e11b724ca6f8..07dd572e2c9e 100644
--- a/www-client/chromium/chromium-97.0.4692.71.ebuild
+++ b/www-client/chromium/chromium-97.0.4692.71-r1.ebuild
@@ -232,6 +232,8 @@ src_prepare() {
"${FILESDIR}/chromium-93-InkDropHost-crash.patch"
"${FILESDIR}/chromium-96-EnumTable-crash.patch"
"${FILESDIR}/chromium-97-arm64-mte-clang.patch"
+ "${FILESDIR}/chromium-97-fix-tag-dragging.patch"
+ "${FILESDIR}/chromium-97-fix-tag-dragging-i3.patch"
"${FILESDIR}/chromium-glibc-2.34.patch"
"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
"${FILESDIR}/chromium-shim_headers.patch"
diff --git a/www-client/chromium/files/chromium-97-fix-tag-dragging.patch b/www-client/chromium/files/chromium-97-fix-tag-dragging.patch
new file mode 100644
index 000000000000..6afd5a78ec05
--- /dev/null
+++ b/www-client/chromium/files/chromium-97-fix-tag-dragging.patch
@@ -0,0 +1,52 @@
+From 692ed3e237fc645253fff3fbb932ad45a525a7ba Mon Sep 17 00:00:00 2001
+From: Marco Genasci <fedeliallalinea@gmail.com>
+Date: Wed, 12 Jan 2022 16:08:41 +0100
+Subject: [PATCH 1/2] [X11] Fix tag dragging in Mutter and KWin
+
+ref: https://bugs.chromium.org/p/chromium/issues/detail?id=1279532
+caused by: https://bugs.chromium.org/p/chromium/issues/detail?id=1263023
+Patches from:
+https://chromium-review.googlesource.com/c/chromium/src/+/3373204
+https://chromium-review.googlesource.com/c/chromium/src/+/3355376
+---
+ .../x11/x11_topmost_window_finder.cc | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/ui/platform_window/x11/x11_topmost_window_finder.cc b/ui/platform_window/x11/x11_topmost_window_finder.cc
+index 50e75e17f..e20bf0abf 100644
+--- a/ui/platform_window/x11/x11_topmost_window_finder.cc
++++ b/ui/platform_window/x11/x11_topmost_window_finder.cc
+@@ -44,15 +44,8 @@ bool EnumerateChildren(ShouldStopIteratingCallback should_stop_iterating,
+ for (iter = windows.rbegin(); iter != windows.rend(); iter++) {
+ if (IsWindowNamed(*iter) && should_stop_iterating.Run(*iter))
+ return true;
+- }
+-
+- // If we're at this point, we didn't find the window we're looking for at the
+- // current level, so we need to recurse to the next level. We use a second
+- // loop because the recursion and call to XQueryTree are expensive and is only
+- // needed for a small number of cases.
+- if (++depth <= max_depth) {
+- for (iter = windows.rbegin(); iter != windows.rend(); iter++) {
+- if (EnumerateChildren(should_stop_iterating, *iter, max_depth, depth))
++ if (depth < max_depth) {
++ if (EnumerateChildren(should_stop_iterating, *iter, max_depth, depth + 1))
+ return true;
+ }
+ }
+@@ -68,9 +61,9 @@ bool EnumerateAllWindows(ShouldStopIteratingCallback should_stop_iterating,
+
+ void EnumerateTopLevelWindows(
+ ui::ShouldStopIteratingCallback should_stop_iterating) {
+- // Some WMs parent 'top-level' windows in unnamed actual top-level windows
+- // (ion WM), so extend the search depth to all children of top-level windows.
+- const int kMaxSearchDepth = 1;
++ // WMs may reparent toplevel windows inside their own containers, so extend
++ // the search to all grandchildren of all toplevel windows.
++ const int kMaxSearchDepth = 2;
+ ui::EnumerateAllWindows(should_stop_iterating, kMaxSearchDepth);
+ }
+
+--
+2.34.1
+