Noticing a screen flicker with 2018 r4

I am getting a noticeable screen flicker (black screen for a half second) in Xojo 2018 r4 that I am not getting in Xojo 2018 r3 when I open some more complex new windows.

I have a complex listbox that I hide before loading to speed things up. May have something to do with it.

Anyone else seeing this?

I was seeing something that might be related, but not new in 2018r4. I was populating a popupmenu in the open event with listindex set to -1. I set the index to 0 and that eliminates the problem for me.

If populating your listbox takes a while, maybe try populating it from a timer with mode=1 period=1 to allow the window to finish opening before the populating code runs, see if that helps.

[quote=425933:@David Schlam]I am getting a noticeable screen flicker (black screen for a half second) in Xojo 2018 r4 that I am not getting in Xojo 2018 r3 when I open some more complex new windows.

I have a complex listbox that I hide before loading to speed things up. May have something to do with it.

Anyone else seeing this?[/quote]
In 2018r4, we updated the macOS SDK from 10.9 to 10.14. Over the course of those 5 years, macOS has gotten less tolerant of apps that don’t yield time to the OS for drawing. If you have any time consuming code on your complex windows, you may want to move that to a thread or a timer so they will yield.

OK, I’ll try to do that. Thanks.

As it turns out, I was creating a new window and then called win.Show in the menu handler and then loaded the window with code in the window open event.

By simply removing win.Show in the menu handler, all the code ran before the window was displayed and the window then opened completed.

I’m assuming that win.Show forces the window to be shown before completely loaded, thus creating the flash of the black screen.

@David Schlam — Yes it does. You may want to use “win.Visible = true” instead, which does not seem to force updating. I discovered that a few weeks ago despite being a 10+ years user. Go figure!