Re: A minor query?

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.

Join bb4w@groups.io to automatically receive all group messages.