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

Unified Diff: ui/aura/event.cc

Issue 10381063: Aura/ash split: Don't use X11 window borders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now with windows/mac implementations Created 8 years, 7 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
Index: ui/aura/event.cc
diff --git a/ui/aura/event.cc b/ui/aura/event.cc
index 8a3bab0f7842004b6908a5f81e18ead4fa3dfa8f..84885f835c6ebf784c01e6637ccb79a75556b218 100644
--- a/ui/aura/event.cc
+++ b/ui/aura/event.cc
@@ -100,7 +100,7 @@ LocatedEvent::LocatedEvent(const base::NativeEvent& native_event)
ui::EventTypeFromNative(native_event),
ui::EventFlagsFromNative(native_event)),
location_(ui::EventLocationFromNative(native_event)),
- root_location_(location_) {
+ root_location_(ui::EventRootLocationFromNative(native_event)) {
}
LocatedEvent::LocatedEvent(const LocatedEvent& model,
@@ -124,11 +124,14 @@ LocatedEvent::LocatedEvent(ui::EventType type,
void LocatedEvent::UpdateForRootTransform(const ui::Transform& root_transform) {
// Transform has to be done at root level.
- DCHECK_EQ(root_location_.x(), location_.x());
- DCHECK_EQ(root_location_.y(), location_.y());
- gfx::Point3f p(location_);
- root_transform.TransformPointReverse(p);
- root_location_ = location_ = p.AsPoint();
+ if (!root_transform.matrix().isIdentity()) {
+ // TODO(oshima): This isn't correct with more than two RootWindows.
Daniel Erat 2012/05/09 20:58:27 Not sure I understand this. Should it be "two or
+ DCHECK_EQ(root_location_.x(), location_.x());
+ DCHECK_EQ(root_location_.y(), location_.y());
+ gfx::Point3f p(location_);
+ root_transform.TransformPointReverse(p);
+ root_location_ = location_ = p.AsPoint();
+ }
}
MouseEvent::MouseEvent(const base::NativeEvent& native_event)

Powered by Google App Engine
This is Rietveld 408576698