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

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 878413003: Support buttons attribute for drag event (chromium side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « content/shell/renderer/test_runner/event_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
index 70db0361e44eb8c6fba012ca33d9883bb73f252c..34660a49d20bcc443b9b2f7770e224afc06a9be7 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
@@ -101,6 +101,12 @@ int XGetModifiers() {
modifiers |= ui::EF_ALT_DOWN;
if (mask & Mod4Mask)
modifiers |= ui::EF_COMMAND_DOWN;
+ if (mask & Button1Mask)
dcheng 2015/02/06 19:53:45 Don't we need to make corresponding changes for Wi
dcheng 2015/02/06 19:53:45 Don't we need to make corresponding changes for Wi
+ modifiers |= ui::EF_LEFT_MOUSE_BUTTON;
+ if (mask & Button2Mask)
+ modifiers |= ui::EF_MIDDLE_MOUSE_BUTTON;
+ if (mask & Button3Mask)
+ modifiers |= ui::EF_RIGHT_MOUSE_BUTTON;
return modifiers;
}
@@ -764,7 +770,10 @@ void DesktopDragDropClientAuraX11::OnMouseMovement(
}
const int kModifiers = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN;
+ ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN |
+ ui::EF_LEFT_MOUSE_BUTTON |
+ ui::EF_MIDDLE_MOUSE_BUTTON |
+ ui::EF_RIGHT_MOUSE_BUTTON;
current_modifier_state_ = flags & kModifiers;
repeat_mouse_move_timer_.Stop();
« no previous file with comments | « content/shell/renderer/test_runner/event_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698