summaryrefslogtreecommitdiffstats
path: root/chrome/views/button_dropdown.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/button_dropdown.cc')
-rw-r--r--chrome/views/button_dropdown.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/views/button_dropdown.cc b/chrome/views/button_dropdown.cc
index cb2b4b2..5eb553e 100644
--- a/chrome/views/button_dropdown.cc
+++ b/chrome/views/button_dropdown.cc
@@ -132,6 +132,11 @@ void ButtonDropDown::ShowDropDownMenu(HWND window) {
anchor = Menu::TOPRIGHT;
View::ConvertPointToScreen(this, &menu_position);
+
+ int left_bound = GetSystemMetrics(SM_XVIRTUALSCREEN);
+ if (menu_position.x() < left_bound)
+ menu_position.set_x(left_bound);
+
Menu menu(menu_delegate_, anchor, window);
// ID's for AppendMenu is 1-based because RunMenu will ignore the user
@@ -187,4 +192,3 @@ bool ButtonDropDown::GetAccessibleState(VARIANT* state) {
}
} // namespace views
-