[Vm-dev] multiple monitors with different backingScaleFactors on MacOS X
eliot.miranda at gmail.com
Thu Apr 7 04:21:29 UTC 2022
Hi Marcel, Tobias, Ronie,
I'm using an M1 laptop with a retina display (RD), which has a pixel
extent of 3456 at 2234 and a scale factor of 2, hence giving an effective
extent of 1728 at 1117. I have a now old Cinema DIsplay (CD) attached, which
has a pixel extent of 2560 at 1440 and a scale factor of 1. When either the
image opens on the CD, or is dragged from the RD to the CD, it ends up half
the desired Smalltalk extent (the one saved in the image header, used to
set the screen size form within Squeak etc).
If I comment out the line sending convertRectFromBacking:
in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer
resetFrame.origin.x = 0.0f;
resetFrame.origin.y = 0.0f;
resetFrame.size.width = width;
resetFrame.size.height = height;
#if 0 // Doing this results in a half sized window on a retina display with
// a backingScalefactor of two
resetFrame = [[self mainView] convertRectFromBacking: resetFrame];
NSSize sizeOfWindowContent = resetFrame.size;
[gDelegateApp.window setContentSize: sizeOfWindowContent];
Clearly this is the wrong thing to do. But something similar needs to
happen when dragging a window from on display to another that
have different scale factors.
My question is where does this happen, or perhaps where should this
happen? Presumably it's somewhere in the event handling code that allows
the window to be moved.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev