summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:45:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:45:13 +0000
commit253a39adbfb946eba237c7021288e511da8da0ca (patch)
treef434b1548b1f1ede61c4e3f48a1ee66c0abc3703 /views/controls
parentdb919fa6eeb44814c553256d440250155e0beaa4 (diff)
downloadchromium_src-253a39adbfb946eba237c7021288e511da8da0ca.zip
chromium_src-253a39adbfb946eba237c7021288e511da8da0ca.tar.gz
chromium_src-253a39adbfb946eba237c7021288e511da8da0ca.tar.bz2
Gets button_dropdown compiling on linux.
BUG=none TEST=none Review URL: http://codereview.chromium.org/118002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/button/button_dropdown.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc
index 92a24ab..f12e276 100644
--- a/views/controls/button/button_dropdown.cc
+++ b/views/controls/button/button_dropdown.cc
@@ -81,15 +81,10 @@ bool ButtonDropDown::OnMouseDragged(const MouseEvent& e) {
bool result = ImageButton::OnMouseDragged(e);
if (!show_menu_factory_.empty()) {
- // SM_CYDRAG is a pixel value for minimum dragging distance before operation
- // counts as a drag, and not just as a click and accidental move of a mouse.
- // See http://msdn2.microsoft.com/en-us/library/ms724385.aspx for details.
- int dragging_threshold = GetSystemMetrics(SM_CYDRAG);
-
// If the mouse is dragged to a y position lower than where it was when
// clicked then we should not wait for the menu to appear but show
// it immediately.
- if (e.y() > y_position_on_lbuttondown_ + dragging_threshold) {
+ if (e.y() > y_position_on_lbuttondown_ + GetHorizontalDragThreshold()) {
show_menu_factory_.RevokeAll();
ShowDropDownMenu(GetWidget()->GetNativeView());
}
@@ -133,7 +128,12 @@ void ButtonDropDown::ShowDropDownMenu(gfx::NativeView window) {
View::ConvertPointToScreen(this, &menu_position);
+#if defined(OS_WIN)
int left_bound = GetSystemMetrics(SM_XVIRTUALSCREEN);
+#else
+ int left_bound = 0;
+ NOTIMPLEMENTED();
+#endif
if (menu_position.x() < left_bound)
menu_position.set_x(left_bound);