WIDTH doesn't adjust to fullscreen

I have a circle that is supposed to be centered on the screen. When the program starts, the output window is closed. My circle is left of the center of the screen. If I open up the output window, the circle becomes centered, but when I close it again, my circle is no longer centered

An example showing this would be useful. It might be to do with how/where you are setting the position of the circle. If you are setting it in draw it will recalculate to take into account the current orientation and output window presence.

-- circlewidthdemo

-- Use this function to perform your initial setup
function setup()
    print("Hello circle")

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)

    -- This sets the line thickness

    -- Do your drawing here

Also don’t use HEIGHT or WIDTH until setup knows what orientation it is in…

This is a slightly related question : is there a counterpart to orientationChanged() which is called when the code is switched from fullscreen to sharing with the output and parameters pane? Do we need to just cache the WIDTH and HEIGHT values and test them for changes between each invocation of draw()?

I don’t remember there being the handy button to hide and show the parameters/output pane before. I like it, but it makes things which had their positions set on creation (e.g., buttons) look a bit awry when WIDTH and HEIGHT are changed without notice. Do I need to write my own fullScreenChanged() code and a hook for it in draw()?