summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/aura/window_tree_host_x11.cc14
-rw-r--r--ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc7
2 files changed, 21 insertions, 0 deletions
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 1db7136..c3dcb19 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -332,6 +332,13 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
switch (xev->type) {
case EnterNotify: {
+ // Ignore EventNotify events from children of |xwindow_|.
+ // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
+ // TODO(pkotwicz|tdanderson): Figure out whether the suppression is
+ // necessary. crbug.com/385716
+ if (xev->xcrossing.detail == NotifyInferior)
+ break;
+
aura::Window* root_window = window();
client::CursorClient* cursor_client =
client::GetCursorClient(root_window);
@@ -348,6 +355,13 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
break;
}
case LeaveNotify: {
+ // Ignore LeaveNotify events from children of |xwindow_|.
+ // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
+ // TODO(pkotwicz|tdanderson): Figure out whether the suppression is
+ // necessary. crbug.com/385716
+ if (xev->xcrossing.detail == NotifyInferior)
+ break;
+
ui::MouseEvent mouse_event(xev);
TranslateAndDispatchLocatedEvent(&mouse_event);
break;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index f5465bf..f507233 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -1530,6 +1530,13 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
switch (xev->type) {
case EnterNotify:
case LeaveNotify: {
+ // Ignore EventNotify and LeaveNotify events from children of |xwindow_|.
+ // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
+ // TODO(pkotwicz|tdanderson): Figure out whether the suppression is
+ // necessary. crbug.com/385716
+ if (xev->xcrossing.detail == NotifyInferior)
+ break;
+
ui::MouseEvent mouse_event(xev);
DispatchMouseEvent(&mouse_event);
break;