diff options
Diffstat (limited to 'chrome/views/native_control.cc')
-rw-r--r-- | chrome/views/native_control.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/views/native_control.cc b/chrome/views/native_control.cc index 04a23fd..c2816be 100644 --- a/chrome/views/native_control.cc +++ b/chrome/views/native_control.cc @@ -258,8 +258,16 @@ void NativeControl::OnContextMenu(const CPoint& location) { if (!GetContextMenuController()) return; - GetContextMenuController()->ShowContextMenu( - this, location.x, location.y, true); + int x = location.x; + int y = location.y; + bool is_mouse = true; + if (x == -1 && y == -1) { + gfx::Point point = GetKeyboardContextMenuLocation(); + x = point.x(); + y = point.y(); + is_mouse = false; + } + ShowContextMenu(x, y, is_mouse); } void NativeControl::Focus() { |