[Cuis-dev] Managing Cuis on Normal & "Retina" displays
Ignacio Sniechowski
0800nacho at gmail.com
Wed Mar 1 16:46:25 PST 2023
Hi Juan!
*Checked:* In both cases, Display extent evaluates to 0 at 0.
I think that as they are using SDL2 it is possible to get de real
resolution:
https://wiki.libsdl.org/SDL2/SDL_DisplayMode
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.
I will continue to research this.
Cheers
*Ignacio Sniechowski*
On Wed, Mar 1, 2023 at 9:28 PM Juan Vuletich <juan at cuis.st> wrote:
> 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.
>
> But still, the real question is: is it possible to know the pixel pitch?
> The real DPI of the physical screen?
>
> On 3/1/2023 8:38 PM, Ignacio Sniechowski via Cuis-dev wrote:
>
> Hi Juan.
> Starting my job here. From what I've been researching in Pharo it seems
> that SDL2 is used.
> There's a process running
> OSSDL2Driver >> eventLoopProcessWithoutPlugin
> | event session |
> event := SDL_Event new.
> session := Smalltalk session.
>
> [ session == Smalltalk session]
> whileTrue: [
> [ (SDL2 pollEvent: event) > 0 ]
> whileTrue: [ self processEvent: event ].
>
> (Delay forMilliseconds: 5) wait ]
>
>
> And also there's a class OSSDL2BackendWindows with a method
> fetchDPI
> That seems to adjust the scale factor. So evidence seems to point that
> they are using fake resolution.
> I will check with Squeak
> *Ignacio Sniechowski*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Mar 1, 2023 at 9:48 AM Juan Vuletich <juan at cuis.st> wrote:
>
>> Hi Nacho,
>>
>> This is a great opportunity for you to help Cuis!
>>
>> - Is Pharo aware of the true pixel resolution both in Retina and External
>> displays?
>> - Is Pharo aware of the true pixel pitch both in Retina and External
>> displays?
>>
>> Answering these questions may take a little time of researching the
>> system. Would you do it for us?
>>
>> 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.
>>
>> 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.
>>
>> Thanks!
>>
>> On 3/1/2023 8:20 AM, Ignacio Sniechowski via Cuis-dev wrote:
>>
>> Hi Juan!
>> Thanks for your prompt reply
>> 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...
>> Cheers!
>>
>>
>> *Ignacio Sniechowski*
>>
>> On Wed, Mar 1, 2023 at 8:15 AM Juan Vuletich <juan at cuis.st> wrote:
>>
>>> Hi Nacho,
>>>
>>> The VM doesn't tell the image about pixel pitch. It would be nice if
>>> Cuis could automatically adapt to it.
>>>
>>> When you say "as other open-source Smalltalk do", do you mean that
>>> Squeak or Pharo know the actual pixel pitch?
>>>
>>> Thanks,
>>>
>>> On 3/1/2023 7:57 AM, Ignacio Sniechowski via Cuis-dev wrote:
>>>
>>> Hi!
>>> Hope everyone is okay.
>>> This is a question for those who have displays (or notebooks) with
>>> "retina" like displays.
>>> How do you manage the size of the GUI elements and fonts?
>>> 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.
>>> It is a VM-related issue or some configuration that I have to do on Cuis.
>>> But either the VM or Cuis is unaware (as other open-source Smalltalk do)
>>> of which kind of display one uses.
>>> Thanks!
>>> Cheers
>>> Nacho
>>>
>>> *Ignacio Sniechowski*
>>>
>>>
>>> --
>>> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>>>
>>>
>>
>> --
>> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>>
>>
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230301/6a3bd867/attachment-0001.htm>
More information about the Cuis-dev
mailing list