summarylogtreecommitdiffstats
path: root/fix-tag-dragging-in-KWin.patch
blob: 226e9259333d107a31c6c63990c0817c93bd3f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 52d0ad25ea695da44195e49f36e69fa81b55e670 Mon Sep 17 00:00:00 2001
From: Tom Anderson <thomasanderson@chromium.org>
Date: Wed, 5 Jan 2022 21:11:03 +0000
Subject: [PATCH] [X11] Fix tag dragging in KWin

R=sky

Bug: 1279532
Change-Id: Iac166803e2149eef234045d922b630f0019c8073
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3355376
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#955869}
---
 ui/platform_window/x11/x11_topmost_window_finder.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/platform_window/x11/x11_topmost_window_finder.cc b/ui/platform_window/x11/x11_topmost_window_finder.cc
index 50e75e17f0a..2e16393487b 100644
--- a/ui/platform_window/x11/x11_topmost_window_finder.cc
+++ b/ui/platform_window/x11/x11_topmost_window_finder.cc
@@ -68,9 +68,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);
 }