shpaass / yafc-ce

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
54 stars 20 forks source link

Fix missing window contents on Linux/Xorg #143

Closed exyi closed 4 months ago

exyi commented 4 months ago

This fixes a glitch that the window contents would be missing after minimization or after covering with another window (on Linux/Xorg).

We now repaint a window when we get window events. The events are usually something like RESTORED, EXPOSED, HIDDEN, SHOWN. I don't really understand what the events mean, but the rebuild is reasonably cheap and neither of the events seems to be very common (all are logged).

The main window already rebuilt on every single repaint, see WindowMain.OnRepaint. This change only affects the other windows, like the file selector or the exception message.