| Index: ui/base/win/events_win.cc
|
| diff --git a/ui/base/win/events_win.cc b/ui/base/win/events_win.cc
|
| index 984e7ca3d6736cfcce595600657cca9762332872..9b13891613d5f265358b1d892f6a0cec89194593 100644
|
| --- a/ui/base/win/events_win.cc
|
| +++ b/ui/base/win/events_win.cc
|
| @@ -111,10 +111,6 @@ int KeyStateFlagsFromNative(const base::NativeEvent& native_event) {
|
| // Returns a mask corresponding to the set of pressed mouse buttons.
|
| // This includes the button of the given message, even if it is being released.
|
| int MouseStateFlagsFromNative(const base::NativeEvent& native_event) {
|
| - // TODO(msw): ORing the pressed/released button into the flags is _wrong_.
|
| - // It makes it impossible to tell which button was modified when multiple
|
| - // buttons are/were held down. Instead, we need to track the modified button
|
| - // independently and audit event consumers to do the right thing.
|
| int win_flags = GetNativeMouseKey(native_event);
|
|
|
| // Client mouse messages provide key states in their WPARAMs.
|
| @@ -226,7 +222,17 @@ bool IsMouseEvent(const base::NativeEvent& native_event) {
|
|
|
| int GetChangedMouseButtonFlagsFromNative(
|
| const base::NativeEvent& native_event) {
|
| - // TODO(sky): implement me.
|
| + switch (GetNativeMouseKey(native_event)) {
|
| + case MK_LBUTTON:
|
| + return EF_LEFT_MOUSE_BUTTON;
|
| + case MK_MBUTTON:
|
| + return EF_MIDDLE_MOUSE_BUTTON;
|
| + case MK_RBUTTON:
|
| + return EF_RIGHT_MOUSE_BUTTON;
|
| + // TODO: add support for MK_XBUTTON1.
|
| + default:
|
| + break;
|
| + }
|
| return 0;
|
| }
|
|
|
|
|