Resizing the display

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Resizing the display

Levente Uzonyi-2
 
Hi,


there's a primitive (92) which can be used to resize the display of
Squeak. The primitive is called from DisplayScreen class >>
#depth:width:height:fullscreen:. It's comment says:  "Force Squeak's
window (if there's one) into a new size and depth.".

On windows:
Evaluating [DisplayScreen depth: 16 width: 1024 height: 580 fullscreen:
true] will change the width and height on Windows, but the depth and
fullscreen arguments are ignored. But that's acceptable, because there are
other methods to set those (#newDepth: and #fullScreenMode:).

On unix:
Evaluating [DisplayScreen depth: 16 width: 1024 height: 580 fullscreen:
true] does nothing. The primitive is not implemented, it's just a stub
that returns 0 - aka false. And that's a problem, because there's no way
to resize the display.

We mostly use vm-display-null and RFB to control our remote images and we
would like to resize the display. We have a shell script that accepts 3
parameters (image_file width height) and changes the stored display
size of the image, but it's cumbersome to use, because we have to quit the
image to use the script.
So I changed the body of display_ioSetDisplayMode to the following:

   setSavedWindowSize((w << 16) + (h & 0xFFFF));
   return 1;

This implementation (mostly) behaves like the Windows version and would
probably work for other unix display plugins and Mac too (IIRC on Mac this
primitive is also unimplemented).

So I propose to change the minimal implementation of primitive 92 to this
code (maybe with additional checks for the parameter values). This way we
could have uniform behavior on all platforms.


Cheers,
Levente
Reply | Threaded
Open this post in threaded view
|

Re: Resizing the display

johnmci
 
http://isqueak.org/ioSetDisplayMode

On 2010-08-22, at 10:05 AM, Levente Uzonyi wrote:

> Mac

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




Reply | Threaded
Open this post in threaded view
|

Re: Resizing the display

Levente Uzonyi-2
 
On Sun, 22 Aug 2010, John M McIntosh wrote:

>
> http://isqueak.org/ioSetDisplayMode

I saw this page earlier and this is what could be changed:

"
iPhone
not supported, return 0 (false)

Unix
Not supported, fprintf to syserr and return 0 (false)
"

Updating the saved display size is better than doing nothing IMO.


Levente

>
> On 2010-08-22, at 10:05 AM, Levente Uzonyi wrote:
>
>> Mac
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Resizing the display

Eliot Miranda-2
 


On Sun, Aug 22, 2010 at 11:01 AM, Levente Uzonyi <[hidden email]> wrote:

On Sun, 22 Aug 2010, John M McIntosh wrote:


http://isqueak.org/ioSetDisplayMode

I saw this page earlier and this is what could be changed:

"
iPhone
not supported, return 0 (false)

Unix
Not supported, fprintf to syserr and return 0 (false)
"

Updating the saved display size is better than doing nothing IMO.

+1.  Make it so, Levente and I will integrate into Cog.
 


Levente



On 2010-08-22, at 10:05 AM, Levente Uzonyi wrote:

Mac

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================