OSR: Resize hold release now uses cached scale factor (fixes issue #3240)
Nick Mueller
Branch: ncmueller/cef:osr-expected-size
Branch: chromiumembedded/cef:master
Merged
Merged pull request
Fix OSR resize issue when multiple monitors have different scale factors (fixes issue #3240)
Per issue #3240:
For Windows OSR, when resolution and scale change via a monitor change, the resize command is started and held, but performed based on the original (old) scale factor, and then before it completes,
device_scale_factor
is updated and the conditionhold_resize_ && pixel_size == SizeInPixels()
never succeeds becauseSizeInPixels()
is based on the new scale factor, and so the hold never releases. The app then never completes the resize and remains in lock. The scale factor change is never completed and it is unresponsive to further resizing.These changes cache the
device_scale_factor
at the start of a resize hold, so that the hold can be released based on the scale factor that was used in the resize operation.