Topics

A minor query?

 

Richard, and all ..

I recently installed bbcsdl on my Linux Mint 19 desktop and it seems to be ok apart from a minor point ... Having opened the IDE, it initially is in a smallish window, if I click the maximise button the screen fills with the white window, but the actual ide area is only about one quarter of that. If I load a program before maximising, the ide area does then fill the screen. Is this considered normal for this version of your bbc basic?

 


Virus-free. www.avast.com

Richard Russell
 

On Tue, Feb 12, 2019 at 08:38 AM, Leslie Baker wrote:
Is this considered normal for this version of your bbc basic?
It doesn't do it here, but then I'm running a different version of Linux (Ubuntu 18.04) on different hardware.   So unfortunately there's no "normal" when it comes to a cross-platform product like BBCSDL, and of all the supported OSes Linux is probably the most variable!

A Google search finds this relevant comment at the old SDL2 forum: "For example, on Linux, when a window is resized, the app will receive the event sequence {LEAVE, FOCUS_LOST, MOVED, (RESIZED, EXPOSED)*... FOCUS_GAINED, ENTER} depending upon the flavor of Linux and the desktop focus policy".

The key phrase there is "depending on the flavour of Linux" and it would seem that yours is behaving in an unhelpful fashion.   That being the case I fear that the only solution will be an ugly workaround.  The key piece of code in SDLIDE.bbc is this:

      IF Resized% THEN
        Resized% = FALSE
        VDU 26
        IF POS REM SDL thread sync.
        PROCdrawall(@vdu%!208, @vdu%!212)
        Refresh% = TRUE
      ENDIF

Try playing with this to see if you can find a modification which fixes the issue without any undesirable side-effects.   An 'obvious' thing to try would be to add a small delay before the VDU 26 to allow the window to settle in its new size before being interrogated.  Since you are the only one who is experiencing the issue I am totally dependent on you to find a solution.

J.G.Harston
 

On 12-02-2019 08:36, Leslie Baker wrote:
initially is in a smallish window, if I click the maximise button the
screen fills with the white window, but the actual ide area is only
about one quarter of that.
Here when running BBSDL on Windows 7 the 'chose IDE' window initially
opens twice the needed size then resizes within less than a second to
the size needed. When SDLIDE is selected there is a very brief flicker
of a window smaller than needed, then the correct size IDE window
is drawn, smaller than full screen.

If I click 'maximize', the window maximises, and the IDE area appears
within it for about a second, then it is redrawn filling the window.
Is that what you mean? It was a bit fiddly to capture this:

http://mdfs.net/temp/resize1.gif
http://mdfs.net/temp/resize2.gif

--
J.G.Harston - jgh@... - mdfs.net/jgh

 

Not quite, but similar.
When I invoke the ide it initially appears as a small window. If I click
maximize a larger window fills the screen but the ide window only occupies
the top left quadrant.
All I need to do before I click maximize is load any basic program, then
click maximize and it does it ok. I can then select new to remove the loaded
program. Its round the houses but it does work.

-----Original Message-----
From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of J.G.Harston
Sent: 12 February, 2019 2:05 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

On 12-02-2019 08:36, Leslie Baker wrote:
initially is in a smallish window, if I click the maximise button the
screen fills with the white window, but the actual ide area is only
about one quarter of that.
Here when running BBSDL on Windows 7 the 'chose IDE' window initially opens
twice the needed size then resizes within less than a second to the size
needed. When SDLIDE is selected there is a very brief flicker of a window
smaller than needed, then the correct size IDE window is drawn, smaller than
full screen.

If I click 'maximize', the window maximises, and the IDE area appears within
it for about a second, then it is redrawn filling the window.
Is that what you mean? It was a bit fiddly to capture this:

http://mdfs.net/temp/resize1.gif
http://mdfs.net/temp/resize2.gif

--
J.G.Harston - jgh@... - mdfs.net/jgh

Richard Russell
 

On Tue, Feb 12, 2019 at 02:14 PM, Leslie Baker wrote:
Its round the houses but it does work.
However it's most unlikely to be reliable.  The underlying cause, I am almost certain, is what I described: the 'window size changed' notification is being generated before the window has 'settled' to its final size, so the VDU 26 is not picking up the correct dimensions.  Please try the modification to SDLIDE.bbc that I suggested, if the addition of a small delay resolves the issue I will incorporate that change in the 'master' version.

 

Does it matter where in that file I place the extra code?

 

From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of Richard Russell
Sent: 12 February, 2019 2:26 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

 

On Tue, Feb 12, 2019 at 02:14 PM, Leslie Baker wrote:

Its round the houses but it does work.

However it's most unlikely to be reliable.  The underlying cause, I am almost certain, is what I described: the 'window size changed' notification is being generated before the window has 'settled' to its final size, so the VDU 26 is not picking up the correct dimensions.  Please try the modification to SDLIDE.bbc that I suggested, if the addition of a small delay resolves the issue I will incorporate that change in the 'master' version.


Virus-free. www.avast.com

Richard Russell
 

On Tue, Feb 12, 2019 at 03:25 PM, Leslie Baker wrote:
Does it matter where in that file I place the extra code?
I'm not really sure what you mean.  Are you saying you've already tried my suggested modification but it hasn't helped?  If you are wanting to perform a more drastic modification involving an extra PROC or FN, don't worry about where you put it; I would move it to where I thought it ought to go anyway when incorporating it in the master version!  :-)

 

Richard,

I have inserted the code you previously sent me into bbcsdl.bbc. When invoking the ide from the desktop icon the screen is filled with a maximized window, but the ‘edit’ window still covers only part of it – about half the height and three quarters of the width. I have double checked, and there are no typos.

 

From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of Richard Russell
Sent: 12 February, 2019 3:41 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

 

On Tue, Feb 12, 2019 at 03:25 PM, Leslie Baker wrote:

Does it matter where in that file I place the extra code?

I'm not really sure what you mean.  Are you saying you've already tried my suggested modification but it hasn't helped?  If you are wanting to perform a more drastic modification involving an extra PROC or FN, don't worry about where you put it; I would move it to where I thought it ought to go anyway when incorporating it in the master version!  :-)


Virus-free. www.avast.com

Richard Russell
 

On Tue, Feb 12, 2019 at 04:19 PM, Leslie Baker wrote:
I have double checked, and there are no typos.
How much delay did you add?  Have you tried adding a silly amount (e.g. a second) so you can see the sequence in which things are happening?  One useful diagnostic would be to output the values that are being passed into PROCdrawall (I find that putting them in the title bar is a good technique because that doesn't interfere with the rest of the GUI).  Is it being passed the dimensions of the 'full' window or only the dimensions of the (incorrect) reduced-size window?

Feel free to take this exchange to direct email if you prefer.

 

Richard,

I am sorry for this. My programming skills are fairly minimal and I do not really know how to handle those two variables in the PROC statement. I have used WAIT statements up to 10 secs before the VDU26. I have had to put the code just before the QUIT, if I put it any earlier it errors with a black screen and ‘No such variable’, so I have had to keep swapping the original file and the test one for each other when it falls over. I know it is defeatist but I am prepared to just load a dummy program, Maximise and click New. When the smaller screen initially comes up I cannot load a program until the window is maximized - clicking on a previous prog gives no result.

 

From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of Richard Russell
Sent: 12 February, 2019 4:39 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

 

On Tue, Feb 12, 2019 at 04:19 PM, Leslie Baker wrote:

I have double checked, and there are no typos.

How much delay did you add?  Have you tried adding a silly amount (e.g. a second) so you can see the sequence in which things are happening?  One useful diagnostic would be to output the values that are being passed into PROCdrawall (I find that putting them in the title bar is a good technique because that doesn't interfere with the rest of the GUI).  Is it being passed the dimensions of the 'full' window or only the dimensions of the (incorrect) reduced-size window?

Feel free to take this exchange to direct email if you prefer.


Virus-free. www.avast.com

Richard Russell
 

On Tue, Feb 12, 2019 at 05:13 PM, Leslie Baker wrote:
I have had to put the code just before the QUIT
Maybe I'm being particularly slow today (I'm suffering from severe back pain so it's possible) but I'm really having difficulty understanding what you mean.  You should not be "putting" code anywhere, all I have asked you to do is add a single WAIT statement before the VDU 26, nothing more.  Perhaps it would be helpful to backtrack:

1.  I suggested that a possible explanation for the observed symptom might be that the window size has not stabilised before it is interrogated by the VDU 26.
2.  To test that hypothesis I suggested adding a delay before the VDU 26 to give more time for it to stabilise.
3.  I listed the relevant code in SDLIDE.bbc where the window size is interrogated using VDU 26, so you would know where to add the delay.

Is there anything there that you don't understand?  Have you successfully located the code that needs to be modified (I assume you know how to use the Edit...Find menu option, or the equivalent Ctrl+F keyboard shortcut)?  Talking about "putting code just before the QUIT" makes no sense to me: why would you be wanting to do something when the program quits?

 

Richard, I see one of the problems – maybe I am getting dyslexic? I read the file as bbcsdl.bbc … I am trying to find sdlide.bbc? So far I have been unable to locate it.  Where should it be? I feel guilty taking up your time, especially when I misread your email.

 

 

From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of Richard Russell
Sent: 12 February, 2019 5:33 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

 

On Tue, Feb 12, 2019 at 05:13 PM, Leslie Baker wrote:

I have had to put the code just before the QUIT

Maybe I'm being particularly slow today (I'm suffering from severe back pain so it's possible) but I'm really having difficulty understanding what you mean.  You should not be "putting" code anywhere, all I have asked you to do is add a single WAIT statement before the VDU 26, nothing more.  Perhaps it would be helpful to backtrack:

1.  I suggested that a possible explanation for the observed symptom might be that the window size has not stabilised before it is interrogated by the VDU 26.
2.  To test that hypothesis I suggested adding a delay before the VDU 26 to give more time for it to stabilise.
3.  I listed the relevant code in SDLIDE.bbc where the window size is interrogated using VDU 26, so you would know where to add the delay.

Is there anything there that you don't understand?  Have you successfully located the code that needs to be modified (I assume you know how to use the Edit...Find menu option, or the equivalent Ctrl+F keyboard shortcut)?  Talking about "putting code just before the QUIT" makes no sense to me: why would you be wanting to do something when the program quits?


Virus-free. www.avast.com

 

Richard,

I have found sdlide.bbc in the tools folder. I have used FIND but cannot see a VDU26 in it?

 


Virus-free. www.avast.com

 

Many thanks ...

Yes I eventually found the right file, FIND did not locate VDU26 but I found it visually. I put 5 secs delay in and the window opens correctly. Sorry for all the hassle, and misreading you email.

Well done Richard ...

 


Virus-free. www.avast.com