Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: ash/host/ash_window_tree_host_x11.cc

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Flatten TranslateLocatedEvent() Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/host/ash_window_tree_host_ozone.cc ('k') | ui/aura/window_tree_host_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host_x11.cc
diff --git a/ash/host/ash_window_tree_host_x11.cc b/ash/host/ash_window_tree_host_x11.cc
index 7dbb94ea245a57682c2f1e23c10c8d51f0f5ca00..a76819593b642a7d181b4b4b8707d0c8d6aaeb6d 100644
--- a/ash/host/ash_window_tree_host_x11.cc
+++ b/ash/host/ash_window_tree_host_x11.cc
@@ -16,7 +16,6 @@
#include "ash/host/root_window_transformer.h"
#include "base/basictypes.h"
#include "base/sys_info.h"
-#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
@@ -226,27 +225,7 @@ bool AshWindowTreeHostX11::CanDispatchEvent(const ui::PlatformEvent& event) {
}
void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
ui::LocatedEvent* event) {
- if (!event->IsTouchEvent()) {
- aura::Window* root_window = window();
- aura::client::ScreenPositionClient* screen_position_client =
- aura::client::GetScreenPositionClient(root_window);
- gfx::Rect local(bounds().size());
- local.Inset(transformer_helper_.GetHostInsets());
-
- if (screen_position_client && !local.Contains(event->location())) {
- gfx::Point location(event->location());
- // In order to get the correct point in screen coordinates
- // during passive grab, we first need to find on which host window
- // the mouse is on, and find out the screen coordinates on that
- // host window, then convert it back to this host window's coordinate.
- screen_position_client->ConvertHostPointToScreen(root_window,
- &location);
- screen_position_client->ConvertPointFromScreen(root_window, &location);
- ConvertPointToHost(&location);
- event->set_location(location);
- event->set_root_location(location);
- }
- }
+ TranslateLocatedEvent(event);
SendEventToProcessor(event);
}
« no previous file with comments | « ash/host/ash_window_tree_host_ozone.cc ('k') | ui/aura/window_tree_host_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698