<div dir="ltr"><div class="gmail_default"><font face="monospace" style="font-size:large">Hi Juan!</font></div><div class="gmail_default"><font face="monospace" style="font-size:large"><b>Checked:</b> </font><font face="monospace" style="font-size:large">In both cases, </font><font face="monospace" size="4">Display extent evaluates to</font><font face="monospace" style="font-size:large"> 0@0.</font></div><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div><div class="gmail_default" style="font-family:monospace;font-size:large">I think that as they are using SDL2 it is possible to get de real resolution:</div><div class="gmail_default" style="font-family:monospace;font-size:large"><a href="https://wiki.libsdl.org/SDL2/SDL_DisplayMode">https://wiki.libsdl.org/SDL2/SDL_DisplayMode</a><br></div><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div><div class="gmail_default" style="font-family:monospace;font-size:large">What is curious is that using Pharo's 8 VM Cuis behaves similarly to Pharo: moving the Cuis windows from the internal screen to the external preserves sizes.</div><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div><div class="gmail_default" style="font-family:monospace;font-size:large">I will continue to research this.</div><div class="gmail_default" style="font-family:monospace;font-size:large">Cheers</div><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b><font size="2">Ignacio Sniechowski</font></b><b><br></b></div><div><br></div><div><b><br></b></div><div><br></div><div><b></b></div><div><b><br></b></div><div><b><br></b></div><div><b><br></b></div><div><b><br></b></div><div><b></b><br></div><b><div><b><br></b></div><div><b><br></b></div><div><b><br></b></div><br></b><b><br></b><b><br></b><div><br><br><div style="text-align:left"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 1, 2023 at 9:28 PM Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</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"><u></u>
<div bgcolor="#ffffff">
Just evaluating `Display extent` will tell you the pixel resolution
that Pharo is using. Maximizing the Pharo window, and checking the
pixel resolution of the physical screen, and what MacOS thinks about
what the pixel resolution is will give useful information. If all
these match, then Pharo is using real resolution. If not, it is
fake. Trying this both in Retina and external screen may help
understand the behavior you see.<br>
<br>
But still, the real question is: is it possible to know the pixel
pitch? The real DPI of the physical screen?<br>
<br>
On 3/1/2023 8:38 PM, Ignacio Sniechowski via Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:monospace;font-size:large">Hi Juan.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Starting my job here. From what I've
been researching in Pharo it seems that SDL2 is used. </div>
<div class="gmail_default" style="font-family:monospace;font-size:large">There's a process running </div>
<div class="gmail_default"><font face="monospace">OSSDL2Driver
>> eventLoopProcessWithoutPlugin</font></div>
<font face="monospace"> <span class="gmail_default" style="font-family:monospace;font-size:large"> </span>|
event session |<br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>event := SDL_Event new.<br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>session := Smalltalk
session.<br>
<br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>[ session == Smalltalk
session] <br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>whileTrue: [<br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>[ (SDL2 pollEvent: event)
> 0 ] <br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>whileTrue: [ self
processEvent: event ].<br>
<br>
<span class="gmail_default" style="font-family:monospace;font-size:large"> </span>(Delay forMilliseconds: 5)
wait ]</font>
<div class="gmail_default" style="font-family:monospace;font-size:large"><br>
</div>
<div class="gmail_default" style="font-family:monospace;font-size:large"><br>
</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">And also there's a class
OSSDL2BackendWindows with a method</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">fetchDPI</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">That seems to adjust the scale factor. So
evidence seems to point that they are using fake resolution.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">I will check with Squeak</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><b><font size="2">Ignacio
Sniechowski</font></b><b><br>
</b></div>
<div><br>
</div>
<div><b><br>
</b></div>
<div><br>
</div>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<div><br>
</div>
<b>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<div><b><br>
</b></div>
<br>
</b><b><br>
</b><b><br>
</b>
<div><br>
<br>
<div style="text-align:left"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Mar 1, 2023 at 9:48 AM
Juan Vuletich <<a href="mailto:juan@cuis.st" target="_blank">juan@cuis.st</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 bgcolor="#ffffff"> Hi Nacho,<br>
<br>
This is a great opportunity for you to help Cuis!<br>
<br>
- Is Pharo aware of the true pixel resolution both in Retina
and External displays?<br>
- Is Pharo aware of the true pixel pitch both in Retina and
External displays?<br>
<br>
Answering these questions may take a little time of
researching the system. Would you do it for us?<br>
<br>
If the answer to both is YES, then we really need to learn
how they do it and try to do the same in Cuis.<br>
<br>
If the answer is NO, maybe they are running at fake pixel
resolution and fake pixel pitch. Then, using the Mac zoom
you could check that a Pharo pixel doesn't correspond to a
physical display pixel. If this is the case, then the
solution is not interesting, because running at true pixel
resolution is crucial to good visual quality.<br>
<br>
Thanks!<br>
<br>
On 3/1/2023 8:20 AM, Ignacio Sniechowski via Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:monospace;font-size:large">Hi Juan!</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Thanks for your
prompt reply</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Yes, I mean Pharo.
Didn't try Squeak. At least using Pharo 10 on a mac
and moving the window from the internal screen to the
external monitor adapts automatically...</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Cheers!</div>
<div class="gmail_default" style="font-family:monospace;font-size:large"><br>
</div>
<div class="gmail_default" style="font-family:monospace;font-size:large"><br>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><b><font size="2">Ignacio
Sniechowski</font></b><b><br>
</b></div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Mar 1, 2023 at
8:15 AM Juan Vuletich <<a href="mailto:juan@cuis.st" target="_blank">juan@cuis.st</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 bgcolor="#ffffff"> Hi Nacho,<br>
<br>
The VM doesn't tell the image about pixel pitch. It
would be nice if Cuis could automatically adapt to
it.<br>
<br>
When you say "as other open-source Smalltalk do", do
you mean that Squeak or Pharo know the actual pixel
pitch?<br>
<br>
Thanks,<br>
<br>
On 3/1/2023 7:57 AM, Ignacio Sniechowski via
Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:monospace;font-size:large">Hi!<br clear="all">
</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Hope everyone is
okay.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">This is a
question for those who have displays (or
notebooks) with "retina" like displays. </div>
<div class="gmail_default" style="font-family:monospace;font-size:large">How do you
manage the size of the GUI elements and fonts?</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">If I set Cuis to
work correctly on an external, full HD
monitor, then when using the internal display
of my mac, everything is enormous, and
vice-versa.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">It is a
VM-related issue or some configuration that I
have to do on Cuis.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">But either the
VM or Cuis is unaware (as other open-source
Smalltalk do) of which kind of display one
uses.</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Thanks!</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Cheers</div>
<div class="gmail_default" style="font-family:monospace;font-size:large">Nacho</div>
<div class="gmail_default" style="font-family:monospace;font-size:large"><br>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><b><font size="2">Ignacio
Sniechowski</font></b><b><br>
</b></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
</blockquote></div>