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

Unified Diff: components/mus/ws/window_tree_host_impl.cc

Issue 1414943003: Moves move logic into WM instead of WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 5 years, 2 months 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 | « components/mus/ws/window_tree_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_host_impl.cc
diff --git a/components/mus/ws/window_tree_host_impl.cc b/components/mus/ws/window_tree_host_impl.cc
index 345c73ef6bd974712cb6028e7da5b0402d7a72f5..7487c0ec3b3f6ec12d0b5ef10f8fe4855ab45e43 100644
--- a/components/mus/ws/window_tree_host_impl.cc
+++ b/components/mus/ws/window_tree_host_impl.cc
@@ -119,14 +119,6 @@ void WindowTreeHostImpl::RemoveAccelerator(uint32_t id) {
event_dispatcher_.RemoveAccelerator(id);
}
-void WindowTreeHostImpl::EnableWindowDraggingForChildren(
- Id transport_window_id) {
- ServerWindow* window =
- root_->GetChildWindow(WindowIdFromTransportId(transport_window_id));
- if (window)
- window->set_is_draggable_window_container(true);
-}
-
void WindowTreeHostImpl::OnClientClosed() {
// |display_manager_.reset()| destroys the display-manager first, and then
// sets |display_manager_| to nullptr. However, destroying |display_manager_|
@@ -247,13 +239,19 @@ ServerWindow* WindowTreeHostImpl::GetFocusedWindowForEventDispatcher() {
}
void WindowTreeHostImpl::DispatchInputEventToWindow(ServerWindow* target,
+ bool in_nonclient_area,
mojo::EventPtr event) {
- // If the window is an embed root, forward to the embedded window, not the
- // owner.
+ // If the event is in the non-client area the event goes to the owner of
+ // the window. Otherwise if the window is an embed root, forward to the
+ // embedded window.
WindowTreeImpl* connection =
- connection_manager_->GetConnectionWithRoot(target->id());
- if (!connection)
+ in_nonclient_area
+ ? connection_manager_->GetConnection(target->id().connection_id)
+ : connection_manager_->GetConnectionWithRoot(target->id());
+ if (!connection) {
+ DCHECK(!in_nonclient_area);
connection = connection_manager_->GetConnection(target->id().connection_id);
+ }
connection->client()->OnWindowInputEvent(WindowIdToTransportId(target->id()),
event.Pass(),
base::Bind(&base::DoNothing));
« no previous file with comments | « components/mus/ws/window_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698