Startup delay and gray box with X11 under special circumstances
- Lazarus/FPC Version: 3.2.2 / 2.2.6
- Operating System: Linux (Ubuntu / Raspberry Pi OS)
- CPU / Bitness: Don't care
What happens
Under special circumstances (non-standard window manager or no window manager at all, which may happen in embedded applications) a Linux/X11 LCL application will show an empty gray box and have a delay at startup until the main form appears. It's very brief on a modern Ubuntu PC, but will take 10s or more on a Raspberry Pi. It's a side-effect of the solution to #36897 (closed), specifically the change to gtk2wsforms that introduces the "dummy widget frame". The command line parameter --disableaccurateframe fixes it, although it took me a while to find this. It also does not happen with the older Lazarus 2.0.x, apparently. Others may run into the same issue, so maybe it's worth revisiting the fix.
What did you expect
I did expect the application to launch instantly, just like when it's run from Lazarus itself.
Steps to reproduce
- Create a new project with a single form, don't change anything.
- Build it.
- Change to a different text login console (Ctrl-Alt-Fx).
- Login, execute "startx ./project1"
There's a forum discussion about this here including a link to a YouTube video showing the problem:
https://forum.lazarus.freepascal.org/index.php/topic,63967.msg486084.html#msg486084