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

Unified Diff: ui/aura/desktop.cc

Issue 8526023: Aura: Fix resize cursors disappearing for some windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years, 1 month 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 | « ui/aura/aura.gyp ('k') | ui/aura/desktop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index d08a062c1888b750b34f309433c89db179e8f453..f502fde85052fcc3c1dc2358d071e4a595b7d99d 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -44,6 +44,8 @@ static const int kDefaultHostWindowY = 200;
static const int kDefaultHostWindowWidth = 1280;
static const int kDefaultHostWindowHeight = 1024;
+// Returns true if |target| has a non-client (frame) component at |location|,
+// in window coordinates.
bool IsNonClientLocation(Window* target, const gfx::Point& location) {
if (!target->delegate())
return false;
@@ -253,7 +255,9 @@ bool Desktop::DispatchMouseEvent(MouseEvent* event) {
}
if (target && target->delegate()) {
int flags = event->flags();
- if (IsNonClientLocation(target, event->location()))
+ gfx::Point location_in_window = event->location();
+ Window::ConvertPointToWindow(this, target, &location_in_window);
+ if (IsNonClientLocation(target, location_in_window))
flags |= ui::EF_IS_NON_CLIENT;
MouseEvent translated_event(*event, this, target, event->type(), flags);
return ProcessMouseEvent(target, &translated_event);
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698