Commit 6be870a8 authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

X11 and Ozone: Raise on click shouldn't handled for Linux win managers.

Atm, that case is only handled for !defined(USE_X11). Instead, it must
be handled for !defined(OS_LINUX) as OS_LINUX can mean either
USE_X11 or USE_OZONE now.

Bug: 789065, 578890
Change-Id: I95d140cb515e833e5b195b1e746671db2cb57b3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336600Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#796349}
parent a9392f47
...@@ -1211,7 +1211,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) { ...@@ -1211,7 +1211,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) {
// Linux window managers like to handle raise-on-click themselves. If we // Linux window managers like to handle raise-on-click themselves. If we
// raise-on-click manually, this may override user settings that prevent // raise-on-click manually, this may override user settings that prevent
// focus-stealing. // focus-stealing.
#if !defined(USE_X11) #if !defined(OS_LINUX)
// It is possible for the web-contents to be destroyed while it is being // It is possible for the web-contents to be destroyed while it is being
// activated. Use a weak-ptr to track whether that happened or not. // activated. Use a weak-ptr to track whether that happened or not.
// More in https://crbug.com/1040725 // More in https://crbug.com/1040725
......
...@@ -186,17 +186,11 @@ TEST_F(WebContentsViewAuraTest, WebContentsDestroyedDuringClick) { ...@@ -186,17 +186,11 @@ TEST_F(WebContentsViewAuraTest, WebContentsDestroyedDuringClick) {
0); 0);
ui::EventHandler* event_handler = GetView(); ui::EventHandler* event_handler = GetView();
event_handler->OnMouseEvent(&mouse_event); event_handler->OnMouseEvent(&mouse_event);
#if defined(USE_X11) #if defined(OS_LINUX)
// The web-content is not activated during mouse-press on X11. // The web-content is not activated during mouse-press on Linux.
// See comment in WebContentsViewAura::OnMouseEvent() for more details. // See comment in WebContentsViewAura::OnMouseEvent() for more details.
// TODO(https://crbug.com/1109695): enable for Ozone/Linux. EXPECT_NE(web_contents(), nullptr);
if (!features::IsUsingOzonePlatform()) {
EXPECT_NE(web_contents(), nullptr);
} else
#endif #endif
{
EXPECT_EQ(web_contents(), nullptr);
}
} }
TEST_F(WebContentsViewAuraTest, OccludeView) { TEST_F(WebContentsViewAuraTest, OccludeView) {
...@@ -319,6 +313,7 @@ TEST_F(WebContentsViewAuraTest, DragDropFiles) { ...@@ -319,6 +313,7 @@ TEST_F(WebContentsViewAuraTest, DragDropFiles) {
#if defined(OS_WIN) || defined(USE_X11) #if defined(OS_WIN) || defined(USE_X11)
TEST_F(WebContentsViewAuraTest, DragDropFilesOriginateFromRenderer) { TEST_F(WebContentsViewAuraTest, DragDropFilesOriginateFromRenderer) {
#if defined(USE_X11) #if defined(USE_X11)
// TODO(https://crbug.com/1109695): enable for Ozone/Linux.
if (features::IsUsingOzonePlatform()) if (features::IsUsingOzonePlatform())
return; return;
#endif #endif
......
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