alloy: Use Views context menus on Windows/Linux (fixes issue #3330)

This commit is contained in:
Marshall Greenblatt
2022-05-13 14:38:41 +03:00
parent 2dcee2ccfc
commit 7a372a642b
41 changed files with 475 additions and 1418 deletions

View File

@@ -48,8 +48,8 @@ bool CefMenuRunnerMac::RunContextMenu(
if (!browser->GetWindowHandle())
return false;
const gfx::Point& screen_point =
browser->GetScreenPoint(gfx::Point(params.x, params.y));
const gfx::Point& screen_point = browser->GetScreenPoint(
gfx::Point(params.x, params.y), /*want_dip_coords=*/true);
NSPoint screen_position = NSPointFromCGPoint(screen_point.ToCGPoint());
[[menu_controller_ menu] popUpMenuPositioningItem:nil
atLocation:screen_position