RemoteMacViews: Fix context menus
This fix has two parts. First, call -[NSView addSubview:] in views::NativeViewHostMac, instead of calling it in views::BridgedNativeWidgetHostImpl. This will set up the browser-side NSView hierarchy, even when the browser-side NSViews are not visible (because the app-side NSViews are). Second, in BridgedNativeWidgetHostImpl::OnWindowGeometryChanged, update the geometry of the browser-side doppelganger NSWindow to match the geometry of the app-side true NSWindow. This ensures that the context menu appears in the right place. Both of these fixes are band-aids on the larger issue that we should change the gfx::NativeView and gfx::NativeWindow types to be a wrapper interface that will clearly delineate the where the native types are actually manipulated, and where the native types are just plumbed through. Bug: 859152 Change-Id: I8428166dd889f45888432220be70de340574c385 Reviewed-on: https://chromium-review.googlesource.com/c/1263592Reviewed-by:Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#597174}
Showing
Please register or sign in to comment