googlefonts / fontview

Demo app that displays fonts with a free/libre/open-source text rendering stack: FreeType, HarfBuzz and Raqm
Other
322 stars 37 forks source link

Fix flickering on Linux #42

Closed khaledhosny closed 6 years ago

khaledhosny commented 6 years ago

Apparently just call Refresh() when wanting to repaint the widget instead of manually re-painting fixes the flickering on Linux.

anthrotype commented 6 years ago

Thanks!

adrientetar commented 6 years ago

Apparently just call Refresh() fixes the flickering on Linux.

The widget was probably being redrawn twice, given that the event loop can send its own paint events in response to various system events. It's best to never paint manually otherwise you loose the batching of paint events.