From: Cheng Zhao Date: Wed, 2 Oct 2013 13:43:52 +0000 (+0800) Subject: win: Show popup menu at right place. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c8566e0d4fedc22c9fa6e6bf7e9ca340fe30e5e;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git win: Show popup menu at right place. --- diff --git a/browser/api/atom_api_menu_win.cc b/browser/api/atom_api_menu_win.cc index 019d011..3e41ab1 100644 --- a/browser/api/atom_api_menu_win.cc +++ b/browser/api/atom_api_menu_win.cc @@ -8,6 +8,7 @@ #include "browser/ui/win/menu_2.h" #include "common/v8_conversions.h" #include "ui/gfx/point.h" +#include "ui/gfx/screen.h" namespace atom { @@ -21,8 +22,9 @@ MenuWin::~MenuWin() { } void MenuWin::Popup(NativeWindow* native_window) { + gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint(); menu_.reset(new atom::Menu2(model_.get())); - menu_->RunContextMenuAt(gfx::Point(0, 0)); + menu_->RunContextMenuAt(cursor); } // static