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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2689283003: chromeos: removes underlay surface offset (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 return; 1931 return;
1932 } 1932 }
1933 // Use the first display. 1933 // Use the first display.
1934 std::set<Display*> displays = window_server_->display_manager()->displays(); 1934 std::set<Display*> displays = window_server_->display_manager()->displays();
1935 if (displays.empty()) 1935 if (displays.empty())
1936 return; 1936 return;
1937 1937
1938 (*displays.begin())->ActivateNextWindow(); 1938 (*displays.begin())->ActivateNextWindow();
1939 } 1939 }
1940 1940
1941 void WindowTree::SetUnderlaySurfaceOffsetAndExtendedHitArea( 1941 void WindowTree::SetExtendedHitArea(Id window_id, const gfx::Insets& hit_area) {
1942 Id window_id,
1943 int32_t x_offset,
1944 int32_t y_offset,
1945 const gfx::Insets& hit_area) {
1946 ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); 1942 ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id));
1947 if (!window) 1943 // Extended hit test region should only be set by the owner of the window.
1944 if (!window || window->id().client_id != id_)
mfomitchev 2017/02/14 18:27:12 Would it be useful to log an error if window->id()
sky 2017/02/14 18:32:41 Done.
1948 return; 1945 return;
1949 1946
1950 window->SetUnderlayOffset(gfx::Vector2d(x_offset, y_offset));
1951 window->set_extended_hit_test_region(hit_area); 1947 window->set_extended_hit_test_region(hit_area);
1952 } 1948 }
1953 1949
1954 void WindowTree::WmResponse(uint32_t change_id, bool response) { 1950 void WindowTree::WmResponse(uint32_t change_id, bool response) {
1955 if (window_server_->in_move_loop() && 1951 if (window_server_->in_move_loop() &&
1956 window_server_->GetCurrentMoveLoopChangeId() == change_id) { 1952 window_server_->GetCurrentMoveLoopChangeId() == change_id) {
1957 ServerWindow* window = window_server_->GetCurrentMoveLoopWindow(); 1953 ServerWindow* window = window_server_->GetCurrentMoveLoopWindow();
1958 1954
1959 if (window->id().client_id != id_) { 1955 if (window->id().client_id != id_) {
1960 window_server_->WindowManagerSentBogusMessage(); 1956 window_server_->WindowManagerSentBogusMessage();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 2150 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
2155 effect_bitmask, callback); 2151 effect_bitmask, callback);
2156 } 2152 }
2157 2153
2158 void WindowTree::PerformOnDragDropDone() { 2154 void WindowTree::PerformOnDragDropDone() {
2159 client()->OnDragDropDone(); 2155 client()->OnDragDropDone();
2160 } 2156 }
2161 2157
2162 } // namespace ws 2158 } // namespace ws
2163 } // namespace ui 2159 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698