Fix window caption disappereance in Linux

After commit 05bb5efca7 on Linux caption of main window reinitializing
to empty caption after switching from/to OpenGL.
This commit fixes that.