mac: Fix OSR scaling behavior when switching displays (fixes issue #3423)

This commit is contained in:
Vladimir Kharitonov 2023-01-12 16:47:19 +00:00 committed by Marshall Greenblatt
parent 44ba3e7c7e
commit d0e1ac2d42
2 changed files with 2 additions and 0 deletions

View File

@ -1053,6 +1053,7 @@ void CefRenderWidgetHostViewOSR::SynchronizeVisualProperties(
void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::OnScreenInfoChanged");
InvalidateLocalSurfaceId();
if (!render_widget_host_)
return;

View File

@ -1183,6 +1183,7 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
}
- (void)viewDidChangeBackingProperties {
[super viewDidChangeBackingProperties];
const CGFloat device_scale_factor = [self getDeviceScaleFactor];
if (device_scale_factor == device_scale_factor_)