<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:small">Hi Marcel, Tobias, Ronie,</div><div style="font-size:small"><br></div><div style="font-size:small">    I'm using an M1 laptop with a retina display (RD), which has a pixel extent of 3456@2234 and a scale factor of 2, hence giving an effective extent of 1728@1117.  I have a now old Cinema DIsplay (CD) attached, which has a pixel extent of 2560@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).</div><div style="font-size:small"><br></div><div style="font-size:small">If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:</div><div style="font-size:small"><br></div><div style="font-size:small">    NSRect resetFrame;<br>    resetFrame.origin.x = 0.0f;<br>    resetFrame.origin.y = 0.0f;<br>    resetFrame.size.width = width;<br>    resetFrame.size.height = height;<br>#if 0 // Doing this results in a half sized window on a retina display with<br>    // a backingScalefactor of two<br>    resetFrame = [[self mainView] convertRectFromBacking: resetFrame];<br>#endif<br><br>    NSSize sizeOfWindowContent = resetFrame.size;<br>    [gDelegateApp.window setContentSize: sizeOfWindowContent];<br></div><div style="font-size:small"><br></div><div style="font-size:small">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.</div><div style="font-size:small"><br></div><div style="font-size:small">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.</div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">I've found this.  The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification.  Where do we plum this in?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><a href="https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-windowdidchangebackingproperties?language=objc">https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-windowdidchangebackingproperties?language=objc</a></div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>