projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a6ff0f
)
win: Show popup menu at right place.
author
Cheng Zhao
<zcbenz@gmail.com>
Wed, 2 Oct 2013 13:43:52 +0000
(21:43 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Wed, 2 Oct 2013 13:43:52 +0000
(21:43 +0800)
browser/api/atom_api_menu_win.cc
patch
|
blob
|
history
diff --git
a/browser/api/atom_api_menu_win.cc
b/browser/api/atom_api_menu_win.cc
index 019d011df077815a915b94ff76c9babe97d997c7..3e41ab18d1f630f25971f3e4ad671c160c4a873a 100644
(file)
--- 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