Commit 75b06652 authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

Ozone/X11: remove override redirect for test config.

The UseTestConfigForPlatformWindows wasn't in use for use_x11
case since https://crrev.com/c/822989 when window_tree_host_x11
was removed and UseTestConfigForPlatformWindows was moved to
x11_window_base, which wasn't in use by use_x11.

Also, this setting affects X11TopmostWindowFinder tests when
they are enabled for Ozone/X11. The way how it affects them
is that they simply fail to run and result in incorrect
test expectations. It looks like this flag intercepts some events
such as map and others...

So, given that it's not used for use_x11 case, just leave that
for ChromeOS as it has always been used by that (my judgement
is based on https://codereview.chromium.org/2683033006) and remove
that for another case, which is Linux.

Bug: 789065
Change-Id: Ib30a3ec7b4352b91da63582027e17ac6ce5c05c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2372385
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801075}
parent fc58b3e7
......@@ -217,18 +217,9 @@ void XWindow::Init(const Configuration& config) {
if (!activatable_ || config.override_redirect)
req.override_redirect = x11::Bool32(true);
// It seems like there is a difference how tests are instantiated in case of
// non-Ozone X11 and Ozone. See more details in
// EnableTestConfigForPlatformWindows. The reason why this must be here is
// that we removed X11WindowBase in favor of the XWindow. The X11WindowBase
// was only used with PlatformWindow, which meant non-Ozone X11 did not use it
// and set override_redirect based only on |activatable_| variable or
// WindowType. But now as XWindow is subclassed by X11Window, which is also a
// PlatformWindow, and non-Ozone X11 uses it, we have to add this workaround
// here. Otherwise, tests for non-Ozone X11 fail.
// TODO(msisov): figure out usage of this for non-Ozone X11.
if (features::IsUsingOzonePlatform() && UseTestConfigForPlatformWindows())
req.override_redirect = x11::Bool32(true);
#if defined(OS_CHROMEOS)
req.override_redirect = x11::Bool32(UseTestConfigForPlatformWindows());
#endif
override_redirect_ = req.override_redirect.has_value();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment