[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Get Virtend to run again on MacOS, avoiding HiDPI changes. (5430585)

Marcel Taeumel notifications at github.com
Tue May 10 08:38:50 UTC 2022


Well, the calls `convertRectToBacking:` and `convertRectFromBacking:` are required to make `primitiveHostWindowSizeSet` work in the HostWindowPlugin. Without them, a request like `DisplayScreen setNewScreenSize: 1024 at 768` from the image will end up as a window double the size on a typical 2.0 retina display. Which is wrong.

I am not familar with the window-sharing/grabbing mechanism in Virtend. Yet, that would be the place to look to figure out how to correctly access windows that are or aren't scaled on macOS.

If your Virtend window is too small, just make it bigger. It's nothing that macOS should do. Your Virtend client has to do it. We provide that primitive `#primitiveScreenScaleFactor` for exactly that reason. If you platform reports 2.0, then just make the Virtend window bigger my that factor.

The goal here is to work with native pixels from within the image. That is, the image can react to changes in the platform scale factor and, for example, resize its window if the platform did not already do this, which can already be checked.

Note that Squeak 5.3 does not do that. Maybe that is the problem. Only 6.0alpha has the image-side code at the moment. macOS used to have an app property to run the app in "Low Resolution Mode". Maybe you need to activate that for Virtend. But I think it's gone in macOS 12. Who knows why.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5430585a3043efd8068a33aaa436fb70bfbe998b#commitcomment-73285774
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/commit/5430585a3043efd8068a33aaa436fb70bfbe998b/73285774 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20220510/35a05479/attachment-0001.html>


More information about the Vm-dev mailing list