win: Fix showing menu on High DPI display.

This commit is contained in:
Cheng Zhao 2014-07-13 22:15:03 +08:00
parent 7c8a0ae2a3
commit adec718503
2 changed files with 8 additions and 1 deletions

View file

@ -8,6 +8,10 @@
#include "ui/gfx/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
#if defined(OS_WIN)
#include "ui/gfx/win/dpi.h"
#endif
namespace atom {
namespace api {
@ -17,6 +21,9 @@ MenuViews::MenuViews() {
void MenuViews::Popup(Window* window) {
gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
#if defined(OS_WIN)
cursor = gfx::win::ScreenToDIPPoint(cursor);
#endif
menu_runner_.reset(new views::MenuRunner(model()));
views::MenuRunner::RunResult result = menu_runner_->RunMenuAt(

2
vendor/brightray vendored

@ -1 +1 @@
Subproject commit 05ae6865c8147b0924d74533bcabb68ec26a284a
Subproject commit 227af5c6af2ce54df0916bc61168045c177d3d39