diff options
author | Stephan Hartmann <sultan@gentoo.org> | 2022-06-01 23:03:52 +0200 |
---|---|---|
committer | Stephan Hartmann <sultan@gentoo.org> | 2022-06-01 23:06:18 +0200 |
commit | d215544160ebe45b6ee03f9cc59976abdf1ce859 (patch) | |
tree | 9579df5e9b866ea773c5a5d8a6e32ce317cd2d4d /www-client/chromium/files | |
parent | www-client/firefox: Stabilize 91.10.0 arm64, #846884 (diff) | |
download | gentoo-d215544160ebe45b6ee03f9cc59976abdf1ce859.tar.gz gentoo-d215544160ebe45b6ee03f9cc59976abdf1ce859.tar.bz2 gentoo-d215544160ebe45b6ee03f9cc59976abdf1ce859.zip |
www-client/chromium: fix tab dragging with i3
No revbump because it is a minor issue.
Bug: https://bugs.gentoo.org/848981
Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r-- | www-client/chromium/files/chromium-102-i3-tab-dragging-fix.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-102-i3-tab-dragging-fix.patch b/www-client/chromium/files/chromium-102-i3-tab-dragging-fix.patch new file mode 100644 index 000000000000..3a6046b690a9 --- /dev/null +++ b/www-client/chromium/files/chromium-102-i3-tab-dragging-fix.patch @@ -0,0 +1,70 @@ +From 95b94a2b841b624be8c0c99730f7011aa56a6a60 Mon Sep 17 00:00:00 2001 +From: Tom Anderson <thomasanderson@chromium.org> +Date: Thu, 26 May 2022 21:04:21 +0000 +Subject: [PATCH] Fix x11::WindowCache::GetWindowAtPoint() in i3 + +In i3, container windows have a WM_NAME, but we're interested in the +named content window. This CL changes the DFS search order to check +child windows before checking parent windows. + +R=sky + +(cherry picked from commit 57032db2a7adea88585b1bb00a3cd6542d04285c) + +Fixed: 1316735 +Change-Id: I8049552f1c0faa7dcbc3bb6b25df2324ee9bbf7a +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3588704 +Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> +Reviewed-by: Scott Violet <sky@chromium.org> +Commit-Queue: Scott Violet <sky@chromium.org> +Cr-Original-Commit-Position: refs/heads/main@{#993220} +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3669471 +Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> +Cr-Commit-Position: refs/branch-heads/5005@{#1031} +Cr-Branched-From: 5b4d9450fee01f821b6400e947b3839727643a71-refs/heads/main@{#992738} +--- + +diff --git a/ui/gfx/x/window_cache.cc b/ui/gfx/x/window_cache.cc +index 0f1fa29..c12bea05 100644 +--- a/ui/gfx/x/window_cache.cc ++++ b/ui/gfx/x/window_cache.cc +@@ -152,13 +152,13 @@ + } + } + +- if (info->has_wm_name) +- return window; + for (Window child : base::Reversed(info->children)) { + Window ret = GetWindowAtPoint(point_px, child, ignore); + if (ret != Window::None) + return ret; + } ++ if (info->has_wm_name) ++ return window; + return Window::None; + } + +diff --git a/ui/gfx/x/window_cache_unittest.cc b/ui/gfx/x/window_cache_unittest.cc +index a4c2378..c88dbfd5 100644 +--- a/ui/gfx/x/window_cache_unittest.cc ++++ b/ui/gfx/x/window_cache_unittest.cc +@@ -418,4 +418,19 @@ + EXPECT_EQ(cache()->GetWindowAtPoint({150, 150}, root()), c); + } + ++// Regression test for https://crbug.com/1316735 ++// If both a parent and child window have a WM_NAME, the child window ++// should be returned by GetWindowAtPoint(). ++TEST_F(WindowCacheTest, NestedWmName) { ++ connection()->MapWindow(root()); ++ SetStringProperty(root(), Atom::WM_NAME, Atom::STRING, "root"); ++ ++ Window a = CreateWindow(root()); ++ connection()->MapWindow(a); ++ SetStringProperty(a, Atom::WM_NAME, Atom::STRING, "a"); ++ ++ cache()->SyncForTest(); ++ EXPECT_EQ(cache()->GetWindowAtPoint({100, 100}, root()), a); ++} ++ + } // namespace x11 |