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

Unified Diff: ui/base/x/events_x.cc

Issue 11031031: Merge 159810 - Use correct location for Enter/LeaveNotify (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 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 | « no previous file | ui/base/x/events_x_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/events_x.cc
===================================================================
--- ui/base/x/events_x.cc (revision 160018)
+++ ui/base/x/events_x.cc (working copy)
@@ -818,6 +818,9 @@
gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
switch (native_event->type) {
+ case EnterNotify:
+ case LeaveNotify:
+ return gfx::Point(native_event->xcrossing.x, native_event->xcrossing.y);
case ButtonPress:
case ButtonRelease:
return gfx::Point(native_event->xbutton.x, native_event->xbutton.y);
@@ -863,6 +866,11 @@
gfx::Point EventSystemLocationFromNative(
const base::NativeEvent& native_event) {
switch (native_event->type) {
+ case EnterNotify:
+ case LeaveNotify: {
+ return gfx::Point(native_event->xcrossing.x_root,
+ native_event->xcrossing.y_root);
+ }
case ButtonPress:
case ButtonRelease: {
return gfx::Point(native_event->xbutton.x_root,
@@ -897,7 +905,9 @@
}
bool IsMouseEvent(const base::NativeEvent& native_event) {
- if (native_event->type == ButtonPress ||
+ if (native_event->type == EnterNotify ||
+ native_event->type == LeaveNotify ||
+ native_event->type == ButtonPress ||
native_event->type == ButtonRelease ||
native_event->type == MotionNotify)
return true;
« no previous file with comments | « no previous file | ui/base/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698