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

Side by Side Diff: components/exo/shell_surface.cc

Issue 2968783002: exo: Fix dragging regression (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/frame/custom_frame_view_ash.h" 9 #include "ash/frame/custom_frame_view_ash.h"
10 #include "ash/public/cpp/shelf_types.h" 10 #include "ash/public/cpp/shelf_types.h"
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 << "Number of pending configure acks for shell surface has reached: " 1262 << "Number of pending configure acks for shell surface has reached: "
1263 << pending_configs_.size(); 1263 << pending_configs_.size();
1264 } 1264 }
1265 1265
1266 aura::Window* ShellSurface::GetDragWindow() { 1266 aura::Window* ShellSurface::GetDragWindow() {
1267 switch (bounds_mode_) { 1267 switch (bounds_mode_) {
1268 case BoundsMode::SHELL: 1268 case BoundsMode::SHELL:
1269 return widget_->GetNativeWindow(); 1269 return widget_->GetNativeWindow();
1270 1270
1271 case BoundsMode::CLIENT: 1271 case BoundsMode::CLIENT:
1272 return host_window(); 1272 return root_surface() ? root_surface()->window() : nullptr;
1273 1273
1274 case BoundsMode::FIXED: 1274 case BoundsMode::FIXED:
1275 return nullptr; 1275 return nullptr;
1276 } 1276 }
1277 1277
1278 NOTREACHED(); 1278 NOTREACHED();
1279 return nullptr; 1279 return nullptr;
1280 } 1280 }
1281 1281
1282 void ShellSurface::AttemptToStartDrag(int component) { 1282 void ShellSurface::AttemptToStartDrag(int component) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 gfx::Point ShellSurface::GetMouseLocation() const { 1681 gfx::Point ShellSurface::GetMouseLocation() const {
1682 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); 1682 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow();
1683 gfx::Point location = 1683 gfx::Point location =
1684 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); 1684 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
1685 aura::Window::ConvertPointToTarget( 1685 aura::Window::ConvertPointToTarget(
1686 root_window, widget_->GetNativeWindow()->parent(), &location); 1686 root_window, widget_->GetNativeWindow()->parent(), &location);
1687 return location; 1687 return location;
1688 } 1688 }
1689 1689
1690 } // namespace exo 1690 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698