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 f6d626d979
commit b1a530c76a
2 changed files with 2 additions and 0 deletions

View File

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

View File

@ -1232,6 +1232,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_) {