Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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. _,,,^..^,,,_ best, Eliot
On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...
_,,,^..^,,,_ best, Eliot
Hi Eliot --
The contract is to rely on the image side to poll both scale factor and screen size and react to changes. Everything is in place. Squeak can even detect for a changed platform scale factor whether the OS already did resize the window.
We just need to merge krono/highdpi-v2 which we are about to do. :-) Then, #actualScreenScaleFactor will be accessible from the image.
Until then, just change the scale factor manually in Squeak via Extras > Scale Factor.
Best, Marcel
P.S.: As always, a purely event-driven system would be the way to go. However, we rely on polling for a changed screen size so we do as well for a changed platform scale factor (here on macOS: backing scale factor).
Am 07.04.2022 06:31:40 schrieb Eliot Miranda eliot.miranda@gmail.com: On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda wrote:
Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...
_,,,^..^,,,_ best, Eliot
-- _,,,^..^,,,_ best, Eliot
On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda <eliot.miranda@gmail.com [mailto:eliot.miranda@gmail.com]> wrote:
Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi... [https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...] _,,,^..^,,,_
best, Eliot
--
_,,,^..^,,,_
best, Eliot
Hi Eliot --
Please try again with the most recent OSVM and Squeak Trunk.
Best, Marcel Am 07.04.2022 09:34:27 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Hi Eliot --
The contract is to rely on the image side to poll both scale factor and screen size and react to changes. Everything is in place. Squeak can even detect for a changed platform scale factor whether the OS already did resize the window.
We just need to merge krono/highdpi-v2 which we are about to do. :-) Then, #actualScreenScaleFactor will be accessible from the image.
Until then, just change the scale factor manually in Squeak via Extras > Scale Factor.
Best, Marcel
P.S.: As always, a purely event-driven system would be the way to go. However, we rely on polling for a changed screen size so we do as well for a changed platform scale factor (here on macOS: backing scale factor).
Am 07.04.2022 06:31:40 schrieb Eliot Miranda eliot.miranda@gmail.com: On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda wrote:
Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...
_,,,^..^,,,_ best, Eliot
-- _,,,^..^,,,_ best, Eliot
On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda <eliot.miranda@gmail.com [mailto:eliot.miranda@gmail.com]> wrote:
Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi... [https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...] _,,,^..^,,,_
best, Eliot
--
_,,,^..^,,,_
best, Eliot
Hi Eliot
On 7. Apr 2022, at 06:31, Eliot Miranda eliot.miranda@gmail.com wrote:
On Wed, Apr 6, 2022 at 9:21 PM Eliot Miranda eliot.miranda@gmail.com wrote: Hi Marcel, Tobias, Ronie,
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).
If I comment out the line sending convertRectFromBacking: in platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m::setupWindow it no longer does this:
NSRect resetFrame; 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]; #endif
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.
I've found this. The iOS code doesn't listen for thewindowDidChangeBackingProperties: notification. Where do we plum this in?
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-wi...
Im on it -t
vm-dev@lists.squeakfoundation.org